<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>云信Web SDK API文档</title>
    
    <meta name="description" content="云信Web SDK API文档" />
    
        <meta name="keywords" content="云信Web SDK API文档" />
        <meta name="keyword" content="云信Web SDK API文档" />
    
    
    
    <meta property="og:title" content=""/>
    <meta property="og:type" content="website"/>
    <meta property="og:image" content=""/>
    
    <meta property="og:url" content=""/>
    
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <script src="scripts/jquery.min.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css">
    <link type="text/css" rel="stylesheet" href="styles/jaguar.css">
    
    
    <script>
    var config = {"monospaceLinks":true,"cleverLinks":true,"default":{"outputSourceFiles":false},"jaguarjs":true,"applicationName":"云信Web SDK API文档","disqus":"","googleAnalytics":"","openGraph":{"title":"","type":"website","image":"","site_name":"","url":""},"meta":{"title":"云信Web SDK API文档","description":"云信Web SDK API文档","keyword":"云信Web SDK API文档"},"linenums":false};
    </script>
    

    
</head>
<body>
<div id="wrap" class="clearfix">
    
<div class="navigation">
    <h3 class="applicationName"><a href="index.html">云信Web SDK API文档</a></h3>

    <div class="search">
        <input id="search" type="text" class="form-control input-sm" placeholder="Search Documentations">
    </div>
    <ul class="list">
    
        <li class="item" data-name="blob">
            <span class="title">
                <a href="blob.html">blob</a>
                
                <span class="static">static</span>
                
            </span>
            <ul class="members itemMembers">
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            <span class="subtitle">Methods</span>
            
                <li data-name="blob.fromDataURL"><a href="blob.html#.fromDataURL">fromDataURL</a></li>
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="support">
            <span class="title">
                <a href="support.html">support</a>
                
                <span class="static">static</span>
                
            </span>
            <ul class="members itemMembers">
            
            <span class="subtitle">Members</span>
            
                <li data-name="support.db"><a href="support.html#.db">db</a></li>
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="util">
            <span class="title">
                <a href="global.html#util">util</a>
                
                <span class="static">static</span>
                
            </span>
            <ul class="members itemMembers">
            
            <span class="subtitle">Members</span>
            
                <li data-name="util.guid"><a href="global.html#util#.guid">guid</a></li>
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            <span class="subtitle">Methods</span>
            
                <li data-name="util.cutObjArray"><a href="global.html#util#.cutObjArray">cutObjArray</a></li>
            
                <li data-name="util.findObjInArray"><a href="global.html#util#.findObjInArray">findObjInArray</a></li>
            
                <li data-name="util.findObjIndexInArray"><a href="global.html#util#.findObjIndexInArray">findObjIndexInArray</a></li>
            
                <li data-name="util.mergeObjArray"><a href="global.html#util#.mergeObjArray">mergeObjArray</a></li>
            
                <li data-name="util.sortObjArray"><a href="global.html#util#.sortObjArray">sortObjArray</a></li>
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="Audio">
            <span class="title">
                <a href="Audio.html">Audio</a>
                
            </span>
            <ul class="members itemMembers">
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="Chatroom">
            <span class="title">
                <a href="Chatroom.html">Chatroom</a>
                
            </span>
            <ul class="members itemMembers">
            
            <span class="subtitle">Members</span>
            
                <li data-name="Chatroom.naturalSort"><a href="Chatroom.html#.naturalSort">naturalSort</a></li>
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            <span class="subtitle">Methods</span>
            
                <li data-name="Chatroom.getInstance"><a href="Chatroom.html#.getInstance">getInstance</a></li>
            
                <li data-name="Chatroom#audioToMp3"><a href="Chatroom.html#audioToMp3">audioToMp3</a></li>
            
                <li data-name="Chatroom#connect"><a href="Chatroom.html#connect">connect</a></li>
            
                <li data-name="Chatroom#disconnect"><a href="Chatroom.html#disconnect">disconnect</a></li>
            
                <li data-name="Chatroom#getChatroom"><a href="Chatroom.html#getChatroom">getChatroom</a></li>
            
                <li data-name="Chatroom#getChatroomMembers"><a href="Chatroom.html#getChatroomMembers">getChatroomMembers</a></li>
            
                <li data-name="Chatroom#getChatroomMembersInfo"><a href="Chatroom.html#getChatroomMembersInfo">getChatroomMembersInfo</a></li>
            
                <li data-name="Chatroom#getHistoryMsgs"><a href="Chatroom.html#getHistoryMsgs">getHistoryMsgs</a></li>
            
                <li data-name="Chatroom#kickChatroomMember"><a href="Chatroom.html#kickChatroomMember">kickChatroomMember</a></li>
            
                <li data-name="Chatroom#markChatroomBlacklist"><a href="Chatroom.html#markChatroomBlacklist">markChatroomBlacklist</a></li>
            
                <li data-name="Chatroom#markChatroomCommonMember"><a href="Chatroom.html#markChatroomCommonMember">markChatroomCommonMember</a></li>
            
                <li data-name="Chatroom#markChatroomGaglist"><a href="Chatroom.html#markChatroomGaglist">markChatroomGaglist</a></li>
            
                <li data-name="Chatroom#markChatroomManager"><a href="Chatroom.html#markChatroomManager">markChatroomManager</a></li>
            
                <li data-name="Chatroom#packFileDownloadName"><a href="Chatroom.html#packFileDownloadName">packFileDownloadName</a></li>
            
                <li data-name="Chatroom#previewFile"><a href="Chatroom.html#previewFile">previewFile</a></li>
            
                <li data-name="Chatroom#sendCustomMsg"><a href="Chatroom.html#sendCustomMsg">sendCustomMsg</a></li>
            
                <li data-name="Chatroom#sendFile"><a href="Chatroom.html#sendFile">sendFile</a></li>
            
                <li data-name="Chatroom#sendGeo"><a href="Chatroom.html#sendGeo">sendGeo</a></li>
            
                <li data-name="Chatroom#sendText"><a href="Chatroom.html#sendText">sendText</a></li>
            
                <li data-name="Chatroom#sendTipMsg"><a href="Chatroom.html#sendTipMsg">sendTipMsg</a></li>
            
                <li data-name="Chatroom#setOptions"><a href="Chatroom.html#setOptions">setOptions</a></li>
            
                <li data-name="Chatroom#updateChatroom"><a href="Chatroom.html#updateChatroom">updateChatroom</a></li>
            
                <li data-name="Chatroom#updateChatroomMemberTempMute"><a href="Chatroom.html#updateChatroomMemberTempMute">updateChatroomMemberTempMute</a></li>
            
                <li data-name="Chatroom#updateMyChatroomMemberInfo"><a href="Chatroom.html#updateMyChatroomMemberInfo">updateMyChatroomMemberInfo</a></li>
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="ChatroomInfo">
            <span class="title">
                <a href="ChatroomInfo.html">ChatroomInfo</a>
                
            </span>
            <ul class="members itemMembers">
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="ChatroomMember">
            <span class="title">
                <a href="ChatroomMember.html">ChatroomMember</a>
                
            </span>
            <ul class="members itemMembers">
            
            <span class="subtitle">Members</span>
            
                <li data-name="ChatroomMember.type"><a href="ChatroomMember.html#.type">type</a></li>
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="ChatroomMessage">
            <span class="title">
                <a href="ChatroomMessage.html">ChatroomMessage</a>
                
            </span>
            <ul class="members itemMembers">
            
            <span class="subtitle">Members</span>
            
                <li data-name="ChatroomMessage.attach.type"><a href="ChatroomMessage.html#.attach.type">attach.type</a></li>
            
                <li data-name="ChatroomMessage.type"><a href="ChatroomMessage.html#.type">type</a></li>
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="File">
            <span class="title">
                <a href="File.html">File</a>
                
            </span>
            <ul class="members itemMembers">
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="Friend">
            <span class="title">
                <a href="Friend.html">Friend</a>
                
            </span>
            <ul class="members itemMembers">
            
            <span class="subtitle">Members</span>
            
                <li data-name="Friend.requestType"><a href="Friend.html#.requestType">requestType</a></li>
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="Geo">
            <span class="title">
                <a href="Geo.html">Geo</a>
                
            </span>
            <ul class="members itemMembers">
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="Image">
            <span class="title">
                <a href="Image.html">Image</a>
                
            </span>
            <ul class="members itemMembers">
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="IMMessage">
            <span class="title">
                <a href="IMMessage.html">IMMessage</a>
                
            </span>
            <ul class="members itemMembers">
            
            <span class="subtitle">Members</span>
            
                <li data-name="IMMessage.attach.type"><a href="IMMessage.html#.attach.type">attach.type</a></li>
            
                <li data-name="IMMessage.scene"><a href="IMMessage.html#.scene">scene</a></li>
            
                <li data-name="IMMessage.type"><a href="IMMessage.html#.type">type</a></li>
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="LoginPort">
            <span class="title">
                <a href="LoginPort.html">LoginPort</a>
                
            </span>
            <ul class="members itemMembers">
            
            <span class="subtitle">Members</span>
            
                <li data-name="LoginPort.type"><a href="LoginPort.html#.type">type</a></li>
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="NIM">
            <span class="title">
                <a href="NIM.html">NIM</a>
                
            </span>
            <ul class="members itemMembers">
            
            <span class="subtitle">Members</span>
            
                <li data-name="NIM.naturalSort"><a href="NIM.html#.naturalSort">naturalSort</a></li>
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            <span class="subtitle">Methods</span>
            
                <li data-name="NIM.getInstance"><a href="NIM.html#.getInstance">getInstance</a></li>
            
                <li data-name="NIM#acceptTeamInvite"><a href="NIM.html#acceptTeamInvite">acceptTeamInvite</a></li>
            
                <li data-name="NIM#addFriend"><a href="NIM.html#addFriend">addFriend</a></li>
            
                <li data-name="NIM#addTeamManagers"><a href="NIM.html#addTeamManagers">addTeamManagers</a></li>
            
                <li data-name="NIM#addTeamMembers"><a href="NIM.html#addTeamMembers">addTeamMembers</a></li>
            
                <li data-name="NIM#addToBlacklist"><a href="NIM.html#addToBlacklist">addToBlacklist</a></li>
            
                <li data-name="NIM#addToMutelist"><a href="NIM.html#addToMutelist">addToMutelist</a></li>
            
                <li data-name="NIM#applyFriend"><a href="NIM.html#applyFriend">applyFriend</a></li>
            
                <li data-name="NIM#applyTeam"><a href="NIM.html#applyTeam">applyTeam</a></li>
            
                <li data-name="NIM#audioToMp3"><a href="NIM.html#audioToMp3">audioToMp3</a></li>
            
                <li data-name="NIM#audioToText"><a href="NIM.html#audioToText">audioToText</a></li>
            
                <li data-name="NIM#blurImage"><a href="NIM.html#blurImage">blurImage</a></li>
            
                <li data-name="NIM#connect"><a href="NIM.html#connect">connect</a></li>
            
                <li data-name="NIM#createTeam"><a href="NIM.html#createTeam">createTeam</a></li>
            
                <li data-name="NIM#cropImage"><a href="NIM.html#cropImage">cropImage</a></li>
            
                <li data-name="NIM#cutFriends"><a href="NIM.html#cutFriends">cutFriends</a></li>
            
                <li data-name="NIM#cutFriendsByAccounts"><a href="NIM.html#cutFriendsByAccounts">cutFriendsByAccounts</a></li>
            
                <li data-name="NIM#cutLoginPorts"><a href="NIM.html#cutLoginPorts">cutLoginPorts</a></li>
            
                <li data-name="NIM#cutRelations"><a href="NIM.html#cutRelations">cutRelations</a></li>
            
                <li data-name="NIM#cutTeamMembers"><a href="NIM.html#cutTeamMembers">cutTeamMembers</a></li>
            
                <li data-name="NIM#cutTeamMembersByAccounts"><a href="NIM.html#cutTeamMembersByAccounts">cutTeamMembersByAccounts</a></li>
            
                <li data-name="NIM#cutTeams"><a href="NIM.html#cutTeams">cutTeams</a></li>
            
                <li data-name="NIM#deleteAllLocalMsgs"><a href="NIM.html#deleteAllLocalMsgs">deleteAllLocalMsgs</a></li>
            
                <li data-name="NIM#deleteAllLocalSysMsgs"><a href="NIM.html#deleteAllLocalSysMsgs">deleteAllLocalSysMsgs</a></li>
            
                <li data-name="NIM#deleteFriend"><a href="NIM.html#deleteFriend">deleteFriend</a></li>
            
                <li data-name="NIM#deleteLocalMsg"><a href="NIM.html#deleteLocalMsg">deleteLocalMsg</a></li>
            
                <li data-name="NIM#deleteLocalMsgsBySession"><a href="NIM.html#deleteLocalMsgsBySession">deleteLocalMsgsBySession</a></li>
            
                <li data-name="NIM#deleteLocalSession"><a href="NIM.html#deleteLocalSession">deleteLocalSession</a></li>
            
                <li data-name="NIM#deleteLocalSysMsg"><a href="NIM.html#deleteLocalSysMsg">deleteLocalSysMsg</a></li>
            
                <li data-name="NIM#deleteLocalTeam"><a href="NIM.html#deleteLocalTeam">deleteLocalTeam</a></li>
            
                <li data-name="NIM#deleteMsg"><a href="NIM.html#deleteMsg">deleteMsg</a></li>
            
                <li data-name="NIM#deleteSession"><a href="NIM.html#deleteSession">deleteSession</a></li>
            
                <li data-name="NIM#deleteSessions"><a href="NIM.html#deleteSessions">deleteSessions</a></li>
            
                <li data-name="NIM#disconnect"><a href="NIM.html#disconnect">disconnect</a></li>
            
                <li data-name="NIM#dismissTeam"><a href="NIM.html#dismissTeam">dismissTeam</a></li>
            
                <li data-name="NIM#findFriend"><a href="NIM.html#findFriend">findFriend</a></li>
            
                <li data-name="NIM#findMsg"><a href="NIM.html#findMsg">findMsg</a></li>
            
                <li data-name="NIM#findRelation"><a href="NIM.html#findRelation">findRelation</a></li>
            
                <li data-name="NIM#findSession"><a href="NIM.html#findSession">findSession</a></li>
            
                <li data-name="NIM#findSysMsg"><a href="NIM.html#findSysMsg">findSysMsg</a></li>
            
                <li data-name="NIM#findTeam"><a href="NIM.html#findTeam">findTeam</a></li>
            
                <li data-name="NIM#findTeamMember"><a href="NIM.html#findTeamMember">findTeamMember</a></li>
            
                <li data-name="NIM#findUser"><a href="NIM.html#findUser">findUser</a></li>
            
                <li data-name="NIM#forwardMsg"><a href="NIM.html#forwardMsg">forwardMsg</a></li>
            
                <li data-name="NIM#getChatroomAddress"><a href="NIM.html#getChatroomAddress">getChatroomAddress</a></li>
            
                <li data-name="NIM#getFriends"><a href="NIM.html#getFriends">getFriends</a></li>
            
                <li data-name="NIM#getHistoryMsgs"><a href="NIM.html#getHistoryMsgs">getHistoryMsgs</a></li>
            
                <li data-name="NIM#getLocalMsgByIdClient"><a href="NIM.html#getLocalMsgByIdClient">getLocalMsgByIdClient</a></li>
            
                <li data-name="NIM#getLocalMsgs"><a href="NIM.html#getLocalMsgs">getLocalMsgs</a></li>
            
                <li data-name="NIM#getLocalMsgsByIdClients"><a href="NIM.html#getLocalMsgsByIdClients">getLocalMsgsByIdClients</a></li>
            
                <li data-name="NIM#getLocalSessions"><a href="NIM.html#getLocalSessions">getLocalSessions</a></li>
            
                <li data-name="NIM#getLocalSysMsgs"><a href="NIM.html#getLocalSysMsgs">getLocalSysMsgs</a></li>
            
                <li data-name="NIM#getLocalTeams"><a href="NIM.html#getLocalTeams">getLocalTeams</a></li>
            
                <li data-name="NIM#getMutedTeamMembers"><a href="NIM.html#getMutedTeamMembers">getMutedTeamMembers</a></li>
            
                <li data-name="NIM#getPushNotificationMultiportConfig"><a href="NIM.html#getPushNotificationMultiportConfig">getPushNotificationMultiportConfig</a></li>
            
                <li data-name="NIM#getRelations"><a href="NIM.html#getRelations">getRelations</a></li>
            
                <li data-name="NIM#getTeam"><a href="NIM.html#getTeam">getTeam</a></li>
            
                <li data-name="NIM#getTeamMembers"><a href="NIM.html#getTeamMembers">getTeamMembers</a></li>
            
                <li data-name="NIM#getTeams"><a href="NIM.html#getTeams">getTeams</a></li>
            
                <li data-name="NIM#getUser"><a href="NIM.html#getUser">getUser</a></li>
            
                <li data-name="NIM#getUsers"><a href="NIM.html#getUsers">getUsers</a></li>
            
                <li data-name="NIM#insertLocalSession"><a href="NIM.html#insertLocalSession">insertLocalSession</a></li>
            
                <li data-name="NIM#interlaceImage"><a href="NIM.html#interlaceImage">interlaceImage</a></li>
            
                <li data-name="NIM#isMsgRemoteRead"><a href="NIM.html#isMsgRemoteRead">isMsgRemoteRead</a></li>
            
                <li data-name="NIM#kick"><a href="NIM.html#kick">kick</a></li>
            
                <li data-name="NIM#leaveTeam"><a href="NIM.html#leaveTeam">leaveTeam</a></li>
            
                <li data-name="NIM#markInBlacklist"><a href="NIM.html#markInBlacklist">markInBlacklist</a></li>
            
                <li data-name="NIM#markInMutelist"><a href="NIM.html#markInMutelist">markInMutelist</a></li>
            
                <li data-name="NIM#markMsgRead"><a href="NIM.html#markMsgRead">markMsgRead</a></li>
            
                <li data-name="NIM#markSysMsgRead"><a href="NIM.html#markSysMsgRead">markSysMsgRead</a></li>
            
                <li data-name="NIM#mergeFriends"><a href="NIM.html#mergeFriends">mergeFriends</a></li>
            
                <li data-name="NIM#mergeLoginPorts"><a href="NIM.html#mergeLoginPorts">mergeLoginPorts</a></li>
            
                <li data-name="NIM#mergeMsgs"><a href="NIM.html#mergeMsgs">mergeMsgs</a></li>
            
                <li data-name="NIM#mergeRelations"><a href="NIM.html#mergeRelations">mergeRelations</a></li>
            
                <li data-name="NIM#mergeSessions"><a href="NIM.html#mergeSessions">mergeSessions</a></li>
            
                <li data-name="NIM#mergeSysMsgs"><a href="NIM.html#mergeSysMsgs">mergeSysMsgs</a></li>
            
                <li data-name="NIM#mergeTeamMembers"><a href="NIM.html#mergeTeamMembers">mergeTeamMembers</a></li>
            
                <li data-name="NIM#mergeTeams"><a href="NIM.html#mergeTeams">mergeTeams</a></li>
            
                <li data-name="NIM#mergeUsers"><a href="NIM.html#mergeUsers">mergeUsers</a></li>
            
                <li data-name="NIM#notifyForNewTeamMsg"><a href="NIM.html#notifyForNewTeamMsg">notifyForNewTeamMsg</a></li>
            
                <li data-name="NIM#packFileDownloadName"><a href="NIM.html#packFileDownloadName">packFileDownloadName</a></li>
            
                <li data-name="NIM#passFriendApply"><a href="NIM.html#passFriendApply">passFriendApply</a></li>
            
                <li data-name="NIM#passTeamApply"><a href="NIM.html#passTeamApply">passTeamApply</a></li>
            
                <li data-name="NIM#previewFile"><a href="NIM.html#previewFile">previewFile</a></li>
            
                <li data-name="NIM#processImage"><a href="NIM.html#processImage">processImage</a></li>
            
                <li data-name="NIM#qualityImage"><a href="NIM.html#qualityImage">qualityImage</a></li>
            
                <li data-name="NIM#rejectFriendApply"><a href="NIM.html#rejectFriendApply">rejectFriendApply</a></li>
            
                <li data-name="NIM#rejectTeamApply"><a href="NIM.html#rejectTeamApply">rejectTeamApply</a></li>
            
                <li data-name="NIM#rejectTeamInvite"><a href="NIM.html#rejectTeamInvite">rejectTeamInvite</a></li>
            
                <li data-name="NIM#removeFromBlacklist"><a href="NIM.html#removeFromBlacklist">removeFromBlacklist</a></li>
            
                <li data-name="NIM#removeFromMutelist"><a href="NIM.html#removeFromMutelist">removeFromMutelist</a></li>
            
                <li data-name="NIM#removeTeamManagers"><a href="NIM.html#removeTeamManagers">removeTeamManagers</a></li>
            
                <li data-name="NIM#removeTeamMembers"><a href="NIM.html#removeTeamMembers">removeTeamMembers</a></li>
            
                <li data-name="NIM#resendMsg"><a href="NIM.html#resendMsg">resendMsg</a></li>
            
                <li data-name="NIM#resetCurrSession"><a href="NIM.html#resetCurrSession">resetCurrSession</a></li>
            
                <li data-name="NIM#resetSessionUnread"><a href="NIM.html#resetSessionUnread">resetSessionUnread</a></li>
            
                <li data-name="NIM#rotateImage"><a href="NIM.html#rotateImage">rotateImage</a></li>
            
                <li data-name="NIM#sendCustomMsg"><a href="NIM.html#sendCustomMsg">sendCustomMsg</a></li>
            
                <li data-name="NIM#sendCustomSysMsg"><a href="NIM.html#sendCustomSysMsg">sendCustomSysMsg</a></li>
            
                <li data-name="NIM#sendFile"><a href="NIM.html#sendFile">sendFile</a></li>
            
                <li data-name="NIM#sendGeo"><a href="NIM.html#sendGeo">sendGeo</a></li>
            
                <li data-name="NIM#sendMsgReceipt"><a href="NIM.html#sendMsgReceipt">sendMsgReceipt</a></li>
            
                <li data-name="NIM#sendText"><a href="NIM.html#sendText">sendText</a></li>
            
                <li data-name="NIM#sendTipMsg"><a href="NIM.html#sendTipMsg">sendTipMsg</a></li>
            
                <li data-name="NIM#setCurrSession"><a href="NIM.html#setCurrSession">setCurrSession</a></li>
            
                <li data-name="NIM#setOptions"><a href="NIM.html#setOptions">setOptions</a></li>
            
                <li data-name="NIM#stripImageMeta"><a href="NIM.html#stripImageMeta">stripImageMeta</a></li>
            
                <li data-name="NIM#thumbnailImage"><a href="NIM.html#thumbnailImage">thumbnailImage</a></li>
            
                <li data-name="NIM#transferTeam"><a href="NIM.html#transferTeam">transferTeam</a></li>
            
                <li data-name="NIM#updateFriend"><a href="NIM.html#updateFriend">updateFriend</a></li>
            
                <li data-name="NIM#updateInfoInTeam"><a href="NIM.html#updateInfoInTeam">updateInfoInTeam</a></li>
            
                <li data-name="NIM#updateLocalMsg"><a href="NIM.html#updateLocalMsg">updateLocalMsg</a></li>
            
                <li data-name="NIM#updateLocalSession"><a href="NIM.html#updateLocalSession">updateLocalSession</a></li>
            
                <li data-name="NIM#updateLocalSysMsg"><a href="NIM.html#updateLocalSysMsg">updateLocalSysMsg</a></li>
            
                <li data-name="NIM#updateMuteStateInTeam"><a href="NIM.html#updateMuteStateInTeam">updateMuteStateInTeam</a></li>
            
                <li data-name="NIM#updateMyInfo"><a href="NIM.html#updateMyInfo">updateMyInfo</a></li>
            
                <li data-name="NIM#updateNickInTeam"><a href="NIM.html#updateNickInTeam">updateNickInTeam</a></li>
            
                <li data-name="NIM#updateTeam"><a href="NIM.html#updateTeam">updateTeam</a></li>
            
                <li data-name="NIM#viewImageStripMeta"><a href="NIM.html#viewImageStripMeta">viewImageStripMeta</a></li>
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="NIMError">
            <span class="title">
                <a href="NIMError.html">NIMError</a>
                
            </span>
            <ul class="members itemMembers">
            
            <span class="subtitle">Members</span>
            
                <li data-name="NIMError.codeMap"><a href="NIMError.html#.codeMap">codeMap</a></li>
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="Relation">
            <span class="title">
                <a href="Relation.html">Relation</a>
                
            </span>
            <ul class="members itemMembers">
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="Session">
            <span class="title">
                <a href="Session.html">Session</a>
                
            </span>
            <ul class="members itemMembers">
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="SystemMessage">
            <span class="title">
                <a href="SystemMessage.html">SystemMessage</a>
                
            </span>
            <ul class="members itemMembers">
            
            <span class="subtitle">Members</span>
            
                <li data-name="SystemMessage.category"><a href="SystemMessage.html#.category">category</a></li>
            
                <li data-name="SystemMessage.state"><a href="SystemMessage.html#.state">state</a></li>
            
                <li data-name="SystemMessage.type"><a href="SystemMessage.html#.type">type</a></li>
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="Team">
            <span class="title">
                <a href="Team.html">Team</a>
                
            </span>
            <ul class="members itemMembers">
            
            <span class="subtitle">Members</span>
            
                <li data-name="Team.beInviteMode"><a href="Team.html#.beInviteMode">beInviteMode</a></li>
            
                <li data-name="Team.inviteMode"><a href="Team.html#.inviteMode">inviteMode</a></li>
            
                <li data-name="Team.joinMode"><a href="Team.html#.joinMode">joinMode</a></li>
            
                <li data-name="Team.type"><a href="Team.html#.type">type</a></li>
            
                <li data-name="Team.updateCustomMode"><a href="Team.html#.updateCustomMode">updateCustomMode</a></li>
            
                <li data-name="Team.updateTeamMode"><a href="Team.html#.updateTeamMode">updateTeamMode</a></li>
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            <span class="subtitle">Methods</span>
            
                <li data-name="Team.fillProperties"><a href="Team.html#.fillProperties">fillProperties</a></li>
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="TeamMember">
            <span class="title">
                <a href="TeamMember.html">TeamMember</a>
                
            </span>
            <ul class="members itemMembers">
            
            <span class="subtitle">Members</span>
            
                <li data-name="TeamMember.type"><a href="TeamMember.html#.type">type</a></li>
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            <span class="subtitle">Methods</span>
            
                <li data-name="TeamMember.fillProperties"><a href="TeamMember.html#.fillProperties">fillProperties</a></li>
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="User">
            <span class="title">
                <a href="User.html">User</a>
                
            </span>
            <ul class="members itemMembers">
            
            <span class="subtitle">Members</span>
            
                <li data-name="User.gender"><a href="User.html#.gender">gender</a></li>
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
        <li class="item" data-name="Video">
            <span class="title">
                <a href="Video.html">Video</a>
                
            </span>
            <ul class="members itemMembers">
            
            </ul>
            <ul class="typedefs itemMembers">
            
            </ul>
            <ul class="methods itemMembers">
            
            </ul>
            <ul class="events itemMembers">
            
            </ul>
        </li>
    
    </ul>
</div>
    <div class="main">
        <h1 class="page-title" data-filename="NIM.html">Class: NIM</h1>
        



<section>
    
<header>
    <h2>
    NIM
    </h2>
    
</header>  

<article>
    <div class="container-overview">
    
    
    
        
<dt>
    <div class="nameContainer">
        <h4 class="name" id="NIM">
            
            new NIM<span class="signature">()</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/index.js, line 19
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>请使用 <a href="NIM.html#.getInstance"><code>NIM.getInstance</code></a> 来初始化 SDK.<br>此接口为单例模式, 对于同一个账号, 永远返回同一份实例, 即只有第一次调用会初始化一个实例, 后续调用此接口会直接返回初始化过的实例.</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    
    

    
</dd>

    
    </div>
    
    
    
    
    
    
    
    
    
    
    
    
        <h3 class="subsection-title">Members</h3>
        
        <dl>
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id=".naturalSort"><span class="type-signature static">static</span>NIM.naturalSort<span class="type-signature type function">function</span> </h4>
    </div>
    
    
</dt>
<dd>
    
    <div class="description">
        <p>SDK 使用 <a target="_blank" href="https://github.com/Bill4Time/javascript-natural-sort">natural sort</a> 来对数组进行排序, 通过 <code>NIM.naturalSort</code> 来获取此库的引用</p>
    </div>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    
</dd>

        </dl>
    
    
    
        <h3 class="subsection-title">Methods</h3>
        
        <dl>
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id=".getInstance">
            
            <span class="type-signature static">static</span>NIM.getInstance<span class="signature">(options)</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/index.js, line 29
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <ul>
<li>此接口为单例模式, 对于同一个账号, 永远返回同一份实例, 即只有第一次调用会初始化一个实例</li>
<li>后续调用此接口会直接返回初始化过的实例, 同时也会调用接口<a href="NIM.html#setOptions"><code>setOptions</code></a>更新传入的配置</li>
<li>后续调用此接口时, 如果连接已断开, 会自动建立连接</li>
<li>当发生掉线时，SDK会自动进行重连</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>debug</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>
|

<span class="param-type">Object</span>


            
            </td>
            
            
                <td class="default">
                
                    false
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否开启调试, 如果开启调试, 将会在控制台输出一些log。默认<code>false</code>不输出日志, 可以传<code>true</code>来开启日志或者传入对象来定制输出日志时使用的样式。</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>style</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>输出日志时使用的样式, 只支持<code>chrom/firefox/safari</code>等高级浏览器, 默认样式为<code>'color:blue;'</code>。</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>appKey</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>在云信管理后台查看应用的 appKey</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>帐号, 应用内唯一</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>token</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>帐号的 token, 用于建立连接</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onconnect</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>连接建立后的回调, 会传入一个对象, 包含登录的信息, 有以下字段</p>
<ul>
<li><code>lastLoginDeviceId</code>: 上次登录的设备的设备号</li>
<li><code>connectionId</code>: 本次登录的连接号</li>
<li><code>ip</code>: 客户端IP</li>
<li><code>port</code>: 客户端端口</li>
<li><code>country</code>: 本次登录的国家</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onwillreconnect</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>即将重连的回调</p>
<ul>
<li>此时说明 SDK 已经断开连接, 请开发者在界面上提示用户连接已断开, 而且正在重新建立连接</li>
<li>此回调会收到一个对象, 包含额外的信息, 有以下字段<ul>
<li><code>duration</code>: 距离下次重连的时间</li>
<li><code>retryCount</code>: 重连尝试的次数</li>
</ul>
</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>ondisconnect</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>断开连接后的回调</p>
<ul>
<li>此时说明 SDK 处于断开状态, 开发者此时应该根据错误码提示相应的错误信息, 并且跳转到登录页面</li>
<li>此回调会收到一个对象, 包含错误的信息, 有以下字段<ul>
<li><code>code</code>: 出错时的错误码, 可能为空<ul>
<li><code>302</code>: 账号或者密码错误, 请跳转到登录页面并提示错误</li>
<li><code>417</code>: 重复登录, 已经在其它端登录了, 请跳转到登录页面并提示错误</li>
<li><code>'kicked'</code>: 被踢</li>
</ul>
</li>
</ul>
</li>
<li>当<code>code</code>为<code>'kicked'</code>的时候, 此对象会有以下字段<ul>
<li><code>reason</code>: 被踢的原因<ul>
<li><code>samePlatformKick</code>: 不允许同一个帐号在多个地方同时登录</li>
<li><code>serverKick</code>: 被服务器踢了</li>
<li><code>otherPlatformKick</code>: 被其它端踢了</li>
</ul>
</li>
<li><code>message</code>: 文字描述的被踢的原因</li>
</ul>
</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onerror</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>发生错误的回调, 会传入<a href="NIMError.html"><code>错误</code></a>对象</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onloginportschange</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>多端登录状态变化的回调, 会收到<a href="LoginPort.html"><code>登录端</code></a>列表, 以下情况会收到此回调</p>
<ul>
<li>登录时其它端在线</li>
<li>登录后其它端上线或者下线</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>syncRelations</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否同步黑名单和静音列表, 默认<code>true</code>. 如果传<code>false</code>就收不到黑名单和静音列表, 即不会收到<code>onblacklist</code>回调和<code>onmutelist</code>回调, 开发者后续可以调用<a href="NIM.html#getRelations"><code>获取黑名单和静音列表</code></a>来获取黑名单和静音列表。</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onblacklist</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>同步黑名单的回调, 会传入黑名单列表<code>blacklist</code></p>
<ul>
<li><code>blacklist</code>的属性<code>invalid</code>包含被删除的黑名单列表</li>
<li>此回调是增量回调, 可以调用<a href="NIM.html#mergeRelations"><code>nim.mergeRelations</code></a>和<a href="NIM.html#cutRelations"><code>nim.cutRelations</code></a>来合并数据</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onsyncmarkinblacklist</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>当前登录用户在其它端<a href="NIM.html#markInBlacklist"><code>加入黑名单/从黑名单移除</code></a>后的回调, 会传入一个参数, 包含两个字段</p>
<ul>
<li><code>account</code>: 要加入黑名单/从黑名单移除的账号</li>
<li><code>isAdd</code>: <code>true</code>表示加入黑名单, <code>false</code>表示从黑名单移除</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onmutelist</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>同步静音列表的回调, 会传入静音列表<code>mutelist</code></p>
<ul>
<li><code>mutelist</code>的属性<code>invalid</code>包含被删除的静音列表</li>
<li>此回调是增量回调, 可以调用<a href="NIM.html#mergeRelations"><code>nim.mergeRelations</code></a>和<a href="NIM.html#cutRelations"><code>nim.cutRelations</code></a>来合并数据</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onsyncmarkinmutelist</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>当前登录用户在其它端<a href="NIM.html#markInMutelist"><code>加入静音列表/从静音列表移除</code></a>后的回调, 会传入一个参数, 包含两个字段</p>
<ul>
<li><code>account</code>: 要加入黑名单/从黑名单移除的账号</li>
<li><code>isAdd</code>: <code>true</code>表示加入静音列表, <code>false</code>表示从静音列表移除</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>syncFriends</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否同步好友列表, 默认<code>true</code>. 如果传<code>false</code>就收不到<code>onfriends</code>回调, 开发者后续可以调用<a href="NIM.html#getFriends"><code>获取好友列表</code></a>来获取好友列表。</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onfriends</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>同步好友列表的回调, 会传入好友列表</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onsyncfriendaction</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>当前登录用户在其它端进行好友相关的操作后的回调</p>
<ul>
<li>操作包括<ul>
<li><a href="NIM.html#addFriend"><code>直接加为好友</code></a></li>
<li><a href="NIM.html#applyFriend"><code>申请加为好友</code></a></li>
<li><a href="NIM.html#passFriendApply"><code>通过好友申请</code></a></li>
<li><a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a></li>
<li><a href="NIM.html#deleteFriend"><code>删除好友</code></a></li>
<li><a href="NIM.html#updateFriend"><code>更新好友</code></a></li>
</ul>
</li>
<li>此回调会收到一个参数<code>obj</code>, 它有一个字段<code>type</code>的值为操作的类型, 具体类型如下：<ul>
<li><code>'addFriend'</code> (直接加为好友), 此时<code>obj</code>的字段如下:<ul>
<li><code>account</code>的值为被直接加为好友的账号</li>
<li><code>friend</code>为被直接加为好友的<a href="Friend.html"><code>好友对象</code></a></li>
<li><code>ps</code>为附言</li>
</ul>
</li>
<li><code>'applyFriend'</code> (申请加为好友), 此时<code>obj</code>的字段如下:<ul>
<li><code>account</code>的值为被申请加为好友的账号</li>
<li><code>ps</code>为附言</li>
</ul>
</li>
<li><code>'passFriendApply'</code> (通过好友申请), 此时<code>obj</code>的字段如下:<ul>
<li><code>account</code>的值为被通过好友申请的账号</li>
<li><code>friend</code>为被通过好友申请的<a href="Friend.html"><code>好友对象</code></a></li>
<li><code>ps</code>为附言</li>
</ul>
</li>
<li><code>'rejectFriendApply'</code> (拒绝好友申请), 此时<code>obj</code>的字段如下:<ul>
<li><code>account</code>的值为被拒绝好友申请的账号</li>
<li><code>ps</code>为附言</li>
</ul>
</li>
<li><code>'deleteFriend'</code> (删除好友), 此时<code>obj</code>的字段如下:<ul>
<li><code>account</code>的值为被删除好友的账号</li>
</ul>
</li>
<li><code>'updateFriend'</code> (更新好友), 此时<code>obj</code>的字段如下:<ul>
<li><code>friend</code>的值为被更新的<a href="Friend.html"><code>好友对象</code></a></li>
</ul>
</li>
</ul>
</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onmyinfo</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>同步登录用户名片的回调, 会传入<a href="User.html"><code>用户名片</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onupdatemyinfo</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>当前登录用户在其它端修改自己的个人名片之后的回调, 会传入<a href="User.html"><code>用户名片</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>syncFriendUsers</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否同步好友对应的用户名片列表, 默认<code>true</code>, 如果传<code>false</code>就收不到<code>onusers</code>回调.</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onusers</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>同步好友用户名片的回调, 会传入<a href="User.html"><code>用户名片</code></a>数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onupdateuser</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>用户名片更新后的回调, 会传入<a href="User.html"><code>用户名片</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>syncTeams</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否同步群列表, 默认<code>true</code>. 如果传<code>false</code>就收不到群列表, 即不会收到<code>onteams</code>回调, 开发者后续可以调用<a href="NIM.html#getTeams"><code>获取群列表</code></a>来获取群列表.</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>syncExtraTeamInfo</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否同步额外的群信息, 默认<code>true</code>会同步额外的群信息, 目前包括</p>
<ul>
<li>当前登录用户是否开启某个群的消息提醒 (SDK 只是存储了此信息, 具体用此信息来做什么事情完全由开发者控制)</li>
<li>调用接口<a href="NIM.html#updateInfoInTeam"><code>NIM#updateInfoInTeam</code></a>来关闭/开启某个群的消息提醒</li>
<li>调用接口<a href="NIM.html#notifyForNewTeamMsg"><code>NIM#notifyForNewTeamMsg</code></a>来查询是否需要群消息通知</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onteams</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>同步群列表的回调, 会传入<a href="Team.html"><code>群</code></a>数组<code>teams</code></p>
<ul>
<li><code>teams</code>的属性<code>invalid</code>包含退出的群</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onsynccreateteam</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>当前登录用户在其它端<a href="NIM.html#createTeam"><code>创建群</code></a>后的回调, 会传入<a href="Team.html"><code>群对象</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>syncTeamMembers</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否同步群成员, 默认<code>true</code>. 只有在<code>syncTeams</code>=<code>true</code>的时候才起作用, 如果传<code>false</code>就不会同步群成员, 即不会收到<code>onteammembers</code>和<code>onsyncteammembersdone</code>回调, 开发者后续可以调用<a href="NIM.html#getTeamMembers"><code>获取群成员</code></a>来获取群成员.</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onteammembers</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>同步群成员的回调, 一个群对应一个回调, 会传入<a href="TeamMember.html"><code>群成员</code></a>数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onsyncteammembersdone</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>当<code>syncTeams</code>和<code>syncTeamMembers</code>同时为true时, 会同步所有群的群成员, 当所有群的群成员同步结束时, 会调用此回调</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onupdateteammember</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>群成员信息更新后的回调, 会传入<a href="TeamMember.html"><code>群成员</code></a>对象, 不过此时的信息是不完整的, 只会包括被更新的字段。当前登录帐号在其它端修改自己在群里面的昵称时也会收到此回调。</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onCreateTeam</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>创建群的回调, 此方法接收一个参数, 包含群信息和群主信息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onUpdateTeam</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>更新群的回调, 此方法接收一个参数, 更新后的群信息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onAddTeamMembers</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>新成员入群的回调, 此方法接收一个参数, 包含群信息和群成员信息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onRemoveTeamMembers</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>有人出群的回调, 此方法接收一个参数, 包含群信息和群成员账号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onUpdateTeamManagers</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>更新群管理员的回调, 此方法接收一个参数, 包含群信息和管理员信息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onDismissTeam</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>解散群的回调, 此方法接收一个参数, 包含被解散的群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onTransferTeam</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>移交群的回调, 此方法接收一个参数, 包含群信息和新老群主信息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onUpdateTeamMembersMute</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>更新群成员禁言状态的回调, 此方法接收一个参数, 包含群信息和禁言状态信息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>syncSessionUnread</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    false
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否同步会话的未读数, 默认不同步</p>
<ul>
<li>如果选择同步<ul>
<li>那么在一个端读过的会话在其它端也会被标记为已读</li>
<li>在调用<a href="NIM.html#setCurrSession"><code>NIM#setCurrSession</code></a>的时候 SDK 会自动同步一次未读数, 此后如果收到当前会话的消息, 需要手动调用<a href="NIM.html#resetSessionUnread"><code>NIM#resetSessionUnread</code></a>来同步未读数</li>
</ul>
</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onsessions</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>同步最近会话列表回调, 会传入<a href="Session.html"><code>会话</code></a>列表, 按时间正序排列, 即最近聊过天的放在列表的最后面。</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onupdatesession</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>更新会话的回调, 会传入<a href="Session.html"><code>会话</code></a>, 以下情况会收到此回调</p>
<ul>
<li>收到消息</li>
<li>发送消息</li>
<li>设置当前会话</li>
<li>重置会话未读数</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>shouldIgnoreNotification</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否要忽略某条通知类消息, 该方法会接收一个消息对象, 如果该方法返回 true, 那么 SDK 将忽略此条通知类消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>syncRoamingMsgs</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否同步漫游消息, 默认<code>true</code>. 如果传<code>false</code>就收不到漫游消息, 即不会收到<code>onroamingmsgs</code>回调.</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onroamingmsgs</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>同步漫游消息的回调, 每个会话对应一个回调, 会传入<a href="IMMessage.html"><code>消息</code></a>数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onofflinemsgs</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>同步离线消息的回调, 每个会话对应一个回调, 会传入<a href="IMMessage.html"><code>消息</code></a>数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onmsg</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>收到消息的回调, 会传入<a href="IMMessage.html"><code>消息</code></a>对象</p>
<ul>
<li>当前登录帐号在其它端发送消息之后也会收到此回调, 注意此时消息对象的<code>from</code>字段就是当前登录的帐号</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>syncMsgReceipts</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否同步已读回执时间戳, 默认<code>true</code>. 如果传<code>false</code>就收不到已读回执时间戳.</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onofflinesysmsgs</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>同步离线系统通知的回调, 会传入<a href="SystemMessage.html"><code>系统通知</code></a>数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onroamingsysmsgs</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>同步漫游系统通知的回调, 会传入<a href="SystemMessage.html"><code>系统通知</code></a>数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onsysmsg</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>收到系统通知的回调, 会传入<a href="SystemMessage.html"><code>系统通知</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onupdatesysmsg</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>更新系统通知后的回调, 会传入<a href="SystemMessage.html"><code>系统通知</code></a></p>
<ul>
<li>以下情况会收到此回调<ul>
<li><a href="NIM.html#passFriendApply"><code>通过好友申请</code></a></li>
<li><a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a></li>
<li><a href="NIM.html#acceptTeamInvite"><code>接受入群邀请</code></a></li>
<li><a href="NIM.html#rejectTeamInvite"><code>拒绝入群邀请</code></a></li>
<li><a href="NIM.html#passTeamApply"><code>通过入群申请</code></a></li>
<li><a href="NIM.html#rejectTeamApply"><code>拒绝入群申请</code></a></li>
</ul>
</li>
<li>这些操作的发起方会收到此回调, 接收被更新的系统通知, 根据操作的类型系统通知会被更新为下面两种状态<ul>
<li><code>'passed'</code>: 已通过</li>
<li><code>'rejected'</code>: 已拒绝</li>
</ul>
</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onsysmsgunread</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>收到系统通知未读数的回调</p>
<ul>
<li>SDK 会管理内建系统通知的未读数, 此回调接收的对象包括以下字段<ul>
<li><code>total</code>: 总共的未读数</li>
<li><code>friend</code>: 所有跟好友相关的系统通知的未读数</li>
<li><code>addFriend</code>: 直接加为好友的未读数</li>
<li><code>applyFriend</code>: 申请加为好友的未读数</li>
<li><code>passFriendApply</code>: 通过好友申请的未读数</li>
<li><code>rejectFriendApply</code>: 拒绝好友申请的未读数</li>
<li><code>deleteFriend</code>: 删除好友的未读数</li>
<li><code>team</code>: 所有跟群相关的系统通知的未读数</li>
<li><code>teamInvite</code>: 入群邀请的未读数</li>
<li><code>rejectTeamInvite</code>: 接受入群邀请的未读数</li>
<li><code>applyTeam</code>: 入群申请的未读数</li>
<li><code>rejectTeamApply</code>: 拒绝入群申请的未读数</li>
</ul>
</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onupdatesysmsgunread</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>更新系统通知未读数的回调</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onofflinecustomsysmsgs</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>同步离线自定义系统通知的回调, 会传入<a href="SystemMessage.html"><code>系统通知</code></a>数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>oncustomsysmsg</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>收到自定义系统通知的回调, 会传入<a href="SystemMessage.html"><code>系统通知</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>onsyncdone</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>当上面各个同步（不包括下面的同步群成员）完成后, 会调用此回调；注意, SDK保证在<code>onsyncdone</code>调用的时候上面的同步肯定完成了, 但是不保证各个同步回调的顺序。</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>autoMarkRead</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否自动标记消息为已收到</p>
<ul>
<li>默认情况下SDK在收到服务器推送过来的消息后, 会在将消息推给开发者时将消息标记为已读状态, 下次登录后就不会收到标记为已读的消息。<ul>
<li>SDK通过<code>onofflinemsgs</code>、<code>onofflinesysmsgs</code>、<code>onofflinecustomsysmsgs</code>等回调将离线消息推送给开发者</li>
<li>SDK通过<code>onmsg</code>、<code>onsysmsg</code>、<code>oncustomsysmsg</code>等回调将在线消息推送给开发者</li>
</ul>
</li>
<li>如果开发者想控制标记消息为已收到的时机, 那么可以传<code>false</code>, 这样SDK就不会自动标记消息已读, 此时需要开发者在适当的时机调用相关的方法来标记消息为已读, 否则下次登录后还会收到未标记为已读的消息。<ul>
<li>调用<a href="NIM.html#markSysMsgRead"><code>标记系统通知已读</code></a>来标记<a href="SystemMessage.html"><code>系统通知</code></a>和<a href="SystemMessage.html#.type"><code>自定义系统通知</code></a>为已读状态</li>
</ul>
</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>db</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否使用数据库</p>
<ul>
<li>在支持数据库的浏览器上 SDK 会将数据缓存到数据库中, 后续同步都是增量更新, 加快初始化速度</li>
<li>如果开发者不想使用数据库, 那么可以设置<code>db</code>为<code>false</code>来禁用数据库</li>
</ul></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var data = {};<br>var nim = new NIM({<br>    // 初始化SDK<br>    // debug: true<br>    appKey: 'appKey',<br>    account: 'account',<br>    token: 'token',<br>    onconnect: onConnect,<br>    onerror: onError,<br>    onwillreconnect: onWillReconnect,<br>    ondisconnect: onDisconnect,<br>    // 多端<br>    onloginportschange: onLoginPortsChange,<br>    // 用户关系<br>    onblacklist: onBlacklist,<br>    onsyncmarkinblacklist: onMarkInBlacklist,<br>    onmutelist: onMutelist,<br>    onsyncmarkinmutelist: onMarkInMutelist,<br>    // 好友关系<br>    onfriends: onFriends,<br>    onsyncfriendaction: onSyncFriendAction,<br>    // 用户名片<br>    onmyinfo: onMyInfo,<br>    onupdatemyinfo: onUpdateMyInfo,<br>    onusers: onUsers,<br>    onupdateuser: onUpdateUser,<br>    // 群组<br>    onteams: onTeams,<br>    onsynccreateteam: onCreateTeam,<br>    onteammembers: onTeamMembers,<br>    onsyncteammembersdone: onSyncTeamMembersDone,<br>    onupdateteammember: onUpdateTeamMember,<br>    // 会话<br>    onsessions: onSessions,<br>    onupdatesession: onUpdateSession,<br>    // 消息<br>    onroamingmsgs: onRoamingMsgs,<br>    onofflinemsgs: onOfflineMsgs,<br>    onmsg: onMsg,<br>    // 系统通知<br>    onofflinesysmsgs: onOfflineSysMsgs,<br>    onsysmsg: onSysMsg,<br>    onupdatesysmsg: onUpdateSysMsg,<br>    onsysmsgunread: onSysMsgUnread,<br>    onupdatesysmsgunread: onUpdateSysMsgUnread,<br>    onofflinecustomsysmsgs: onOfflineCustomSysMsgs,<br>    oncustomsysmsg: onCustomSysMsg,<br>    // 同步完成<br>    onsyncdone: onSyncDone<br>});</p>
<p>function onConnect() {<br>    console.log('连接成功');<br>}<br>function onWillReconnect(obj) {<br>    // 此时说明 <code>SDK</code> 已经断开连接, 请开发者在界面上提示用户连接已断开, 而且正在重新建立连接<br>    console.log('即将重连', obj);<br>}<br>function onDisconnect(error) {<br>    // 此时说明 <code>SDK</code> 处于断开状态, 开发者此时应该根据错误码提示相应的错误信息, 并且跳转到登录页面<br>    console.log('连接断开', error);<br>    if (error) {<br>        switch (error.code) {<br>        // 账号或者密码错误, 请跳转到登录页面并提示错误<br>        case 302:<br>            break;<br>        // 重复登录, 已经在其它端登录了, 请跳转到登录页面并提示错误<br>        case 417:<br>            break;<br>        // 被踢, 请提示错误后跳转到登录页面<br>        case 'kicked':<br>            break;<br>        default:<br>            break;<br>        }<br>    }<br>}<br>function onError(error, obj) {<br>    console.log('发生错误', error, obj);<br>}</p>
<p>function onLoginPortsChange(loginPorts) {<br>    console.log('当前登录帐号在其它端的状态发生改变了', loginPorts);<br>}</p>
<p>function onBlacklist(blacklist) {<br>    console.log('收到黑名单', blacklist);<br>    data.blacklist = nim.mergeRelations(data.blacklist, blacklist);<br>    data.blacklist = nim.cutRelations(data.blacklist, blacklist.invalid);<br>    refreshBlacklistUI();<br>}<br>function onMarkInBlacklist(obj) {<br>    console.log(obj.account + '被你' + (obj.isAdd ? '加入' : '移除') + '黑名单', obj);<br>    if (obj.isAdd) {<br>        addToBlacklist(obj);<br>    } else {<br>        removeFromBlacklist(obj);<br>    }<br>}<br>function addToBlacklist(obj) {<br>    data.blacklist = nim.mergeRelations(data.blacklist, obj.record);<br>    refreshBlacklistUI();<br>}<br>function removeFromBlacklist(obj) {<br>    data.blacklist = nim.cutRelations(data.blacklist, obj.record);<br>    refreshBlacklistUI();<br>}<br>function refreshBlacklistUI() {<br>    // 刷新界面<br>}<br>function onMutelist(mutelist) {<br>    console.log('收到静音列表', mutelist);<br>    data.mutelist = nim.mergeRelations(data.mutelist, mutelist);<br>    data.mutelist = nim.cutRelations(data.mutelist, mutelist.invalid);<br>    refreshMutelistUI();<br>}<br>function onMarkInMutelist(obj) {<br>    console.log(obj.account + '被你' + (obj.isAdd ? '加入' : '移除') + '静音列表', obj);<br>    if (obj.isAdd) {<br>        addToMutelist(obj);<br>    } else {<br>        removeFromMutelist(obj);<br>    }<br>}<br>function addToMutelist(obj) {<br>    data.mutelist = nim.mergeRelations(data.mutelist, obj.record);<br>    refreshMutelistUI();<br>}<br>function removeFromMutelist(obj) {<br>    data.mutelist = nim.cutRelations(data.mutelist, obj.record);<br>    refreshMutelistUI();<br>}<br>function refreshMutelistUI() {<br>    // 刷新界面<br>}</p>
<p>function onFriends(friends) {<br>    console.log('收到好友列表', friends);<br>    data.friends = nim.mergeFriends(data.friends, friends);<br>    data.friends = nim.cutFriends(data.friends, friends.invalid);<br>    refreshFriendsUI();<br>}<br>function onSyncFriendAction(obj) {<br>    console.log('收到好友操作', obj);<br>    switch (obj.type) {<br>    case 'addFriend':<br>        console.log('你在其它端直接加了一个好友' + obj);<br>        onAddFriend(obj.friend);<br>        break;<br>    case 'applyFriend':<br>        console.log('你在其它端申请加了一个好友' + obj);<br>        break;<br>    case 'passFriendApply':<br>        console.log('你在其它端通过了一个好友申请' + obj);<br>        onAddFriend(obj.friend);<br>        break;<br>    case 'rejectFriendApply':<br>        console.log('你在其它端拒绝了一个好友申请' + obj);<br>        break;<br>    case 'deleteFriend':<br>        console.log('你在其它端删了一个好友' + obj);<br>        onDeleteFriend(obj.account);<br>        break;<br>    case 'updateFriend':<br>        console.log('你在其它端更新了一个好友', obj);<br>        onUpdateFriend(obj.friend);<br>        break;<br>    }<br>}<br>function onAddFriend(friend) {<br>    data.friends = nim.mergeFriends(data.friends, friend);<br>    refreshFriendsUI();<br>}<br>function onDeleteFriend(account) {<br>    data.friends = nim.cutFriendsByAccounts(data.friends, account);<br>    refreshFriendsUI();<br>}<br>function onUpdateFriend(friend) {<br>    data.friends = nim.mergeFriends(data.friends, friend);<br>    refreshFriendsUI();<br>}<br>function refreshFriendsUI() {<br>    // 刷新界面<br>}</p>
<p>function onMyInfo(user) {<br>    console.log('收到我的名片', user);<br>    data.myInfo = user;<br>    updateMyInfoUI();<br>}<br>function onUpdateMyInfo(user) {<br>    console.log('我的名片更新了', user);<br>    data.myInfo = NIM.util.merge(data.myInfo, user);<br>    updateMyInfoUI();<br>}<br>function updateMyInfoUI() {<br>    // 刷新界面<br>}<br>function onUsers(users) {<br>    console.log('收到用户名片列表', users);<br>    data.users = nim.mergeUsers(data.users, users);<br>}<br>function onUpdateUser(user) {<br>    console.log('用户名片更新了', user);<br>    data.users = nim.mergeUsers(data.users, user);<br>}</p>
<p>function onTeams(teams) {<br>    console.log('群列表', teams);<br>    data.teams = nim.mergeTeams(data.teams, teams);<br>    onInvalidTeams(teams.invalid);<br>}<br>function onInvalidTeams(teams) {<br>    data.teams = nim.cutTeams(data.teams, teams);<br>    data.invalidTeams = nim.mergeTeams(data.invalidTeams, teams);<br>    refreshTeamsUI();<br>}<br>function onCreateTeam(team) {<br>    console.log('你创建了一个群', team);<br>    data.teams = nim.mergeTeams(data.teams, team);<br>    refreshTeamsUI();<br>    onTeamMembers({<br>        teamId: team.teamId,<br>        members: owner<br>    });<br>}<br>function refreshTeamsUI() {<br>    // 刷新界面<br>}<br>function onTeamMembers(obj) {<br>    console.log('收到群成员', obj);<br>    var teamId = obj.teamId;<br>    var members = obj.members;<br>    data.teamMembers = data.teamMembers || {};<br>    data.teamMembers[teamId] = nim.mergeTeamMembers(data.teamMembers[teamId], members);<br>    data.teamMembers[teamId] = nim.cutTeamMembers(data.teamMembers[teamId], members.invalid);<br>    refreshTeamMembersUI();<br>}<br>function onSyncTeamMembersDone() {<br>    console.log('同步群列表完成');<br>}<br>function onUpdateTeamMember(teamMember) {<br>    console.log('群成员信息更新了', teamMember);<br>    onTeamMembers({<br>        teamId: teamMember.teamId,<br>        members: teamMember<br>    });<br>}<br>function refreshTeamMembersUI() {<br>    // 刷新界面<br>}</p>
<p>function onSessions(sessions) {<br>    console.log('收到会话列表', sessions);<br>    data.sessions = nim.mergeSessions(data.sessions, sessions);<br>    updateSessionsUI();<br>}<br>function onUpdateSession(session) {<br>    console.log('会话更新了', session);<br>    data.sessions = nim.mergeSessions(data.sessions, session);<br>    updateSessionsUI();<br>}<br>function updateSessionsUI() {<br>    // 刷新界面<br>}</p>
<p>function onRoamingMsgs(obj) {<br>    console.log('漫游消息', obj);<br>    pushMsg(obj.msgs);<br>}<br>function onOfflineMsgs(obj) {<br>    console.log('离线消息', obj);<br>    pushMsg(obj.msgs);<br>}<br>function onMsg(msg) {<br>    console.log('收到消息', msg.scene, msg.type, msg);<br>    pushMsg(msg);<br>}<br>function pushMsg(msgs) {<br>    if (!Array.isArray(msgs)) { msgs = [msgs]; }<br>    var sessionId = msgs[0].sessionId;<br>    data.msgs = data.msgs || {};<br>    data.msgs[sessionId] = nim.mergeMsgs(data.msgs[sessionId], msgs);<br>}</p>
<p>function onOfflineSysMsgs(sysMsgs) {<br>    console.log('收到离线系统通知', sysMsgs);<br>    pushSysMsgs(sysMsgs);<br>}<br>function onSysMsg(sysMsg) {<br>    console.log('收到系统通知', sysMsg)<br>    pushSysMsgs(sysMsg);<br>}<br>function onUpdateSysMsg(sysMsg) {<br>    pushSysMsgs(sysMsg);<br>}<br>function pushSysMsgs(sysMsgs) {<br>    data.sysMsgs = nim.mergeSysMsgs(data.sysMsgs, sysMsgs);<br>    refreshSysMsgsUI();<br>}<br>function onSysMsgUnread(obj) {<br>    console.log('收到系统通知未读数', obj);<br>    data.sysMsgUnread = obj;<br>    refreshSysMsgsUI();<br>}<br>function onUpdateSysMsgUnread(obj) {<br>    console.log('系统通知未读数更新了', obj);<br>    data.sysMsgUnread = obj;<br>    refreshSysMsgsUI();<br>}<br>function refreshSysMsgsUI() {<br>    // 刷新界面<br>}<br>function onOfflineCustomSysMsgs(sysMsgs) {<br>    console.log('收到离线自定义系统通知', sysMsgs);<br>}<br>function onCustomSysMsg(sysMsg) {<br>    console.log('收到自定义系统通知', sysMsg);<br>}</p>
<p>function onSyncDone() {<br>    console.log('同步完成');<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="acceptTeamInvite">
            
            acceptTeamInvite<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 239
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>接受入群邀请</p>
<ul>
<li>高级群的群主和管理员在邀请成员加入群（通过操作<a href="NIM.html#createTeam"><code>创建群</code></a>或<a href="NIM.html#addTeamMembers"><code>拉人入群</code></a>）之后, 被邀请的人会收到一条类型为<code>'teamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为邀请方的帐号, <code>to</code>字段的值为对应的群ID, 此类系统通知的<code>attach</code>有一个字段<code>team</code>的值为被邀请进入的<a href="Team.html"><code>群</code></a>, 被邀请的人可以选择接受邀请或者拒绝邀请。<ul>
<li>如果<a href="NIM.html#acceptTeamInvite"><code>接受入群邀请</code></a>, 那么该群的所有群成员会收到一条类型为<code>'acceptTeamInvite'</code>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 此类群通知消息的<code>from</code>字段的值为接受入群邀请的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>members</code>的值为接收入群邀请的群成员列表。</li>
<li>如果<a href="NIM.html#rejectTeamInvite"><code>拒绝入群邀请</code></a>, 那么邀请你的人会收到一条类型为<code>'rejectTeamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝入群邀请的人的帐号, <code>to</code>字段的值为对应的群ID。</li>
</ul>
</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>idServer</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>对应的系统通知的 <code>idServer</code></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>from</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>邀请方的帐号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时会收到<a href="Team.html"><code>群资料</code></a></p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>// 假设 sysMsg 是通过回调 <code>onsysmsg</code> 收到的系统通知<br>nim.acceptTeamInvite({<br>    idServer: sysMsg.idServer,<br>    teamId: '123',<br>    from: 'zyy1',<br>    done: acceptTeamInviteDone<br>});<br>function acceptTeamInviteDone(error, obj) {<br>    console.log('接受入群邀请' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#rejectTeamInvite"><code>拒绝入群邀请</code></a></li>
        
            <li><a href="NIM.html#addTeamMembers"><code>拉人入群</code></a></li>
        
            <li><a href="NIM.html#getTeamMembers"><code>获取群成员</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="addFriend">
            
            addFriend<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/friend.js, line 63
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>直接加为好友</p>
<ul>
<li><a href="NIM.html#addFriend"><code>直接加某个用户为好友</code></a>后, 对方不需要确认, 直接成为当前登录用户的好友。</li>
<li>对方会收到一条类型为<code>'addFriend'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为申请方的帐号, <code>to</code>字段的值为接收方的账号。</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>要直接加为好友的账号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>ps</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.addFriend({<br>    account: 'account',<br>    ps: 'ps',<br>    done: addFriendDone<br>});<br>function addFriendDone(error, obj) {<br>    console.log('直接加为好友' + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        onAddFriend(obj.friend);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#applyFriend"><code>申请加为好友</code></a></li>
        
            <li><a href="NIM.html#passFriendApply"><code>通过好友申请</code></a></li>
        
            <li><a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a></li>
        
            <li><a href="NIM.html#deleteFriend"><code>删除好友</code></a></li>
        
            <li><a href="NIM.html#updateFriend"><code>更新好友</code></a></li>
        
            <li><a href="NIM.html#getFriends"><code>获取好友列表</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="addTeamManagers">
            
            addTeamManagers<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 460
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>添加群管理员</p>
<ul>
<li><a href="NIM.html#addTeamManagers"><code>添加群管理员</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach.type"><code><code>'addTeamManagers'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为添加群管理员的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>accounts</code>的值为被加为管理员的帐号列表, <code>attach</code>有一个字段<code>members</code>的值为被加为管理员的群成员列表。</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>accounts</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要添加的管理员帐号列表</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.addTeamManagers({<br>    teamId: '123',<br>    accounts: ['a2', 'a3'],<br>    done: addTeamManagersDone<br>});<br>function addTeamManagersDone(error, obj) {<br>    console.log('添加群管理员' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#removeTeamManagers"><code>移除群管理员</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="addTeamMembers">
            
            addTeamMembers<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 155
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>拉人入群</p>
<ul>
<li>普通群, <a href="NIM.html#addTeamMembers"><code>拉人入群</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach.type"><code><code>`'addTeamMembers'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为拉人的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="#群对象">群对象</a>, <code>attach</code>有一个字段<code>accounts</code>的值为被拉的人的帐号列表, <code>attach</code>有一个字段<code>members</code>的值为被拉的群成员列表。<ul>
<li>被邀请的群成员在有人说话后才能看到该<a href="Team.html"><code>群</code></a>, 而且会先收到一条类型为<a href="IMMessage.html#.attach.type"><code><code>'addTeamMembers'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 然后会收到其它<a href="global.html#Message"><code>群消息</code></a>。</li>
</ul>
</li>
<li>高级群的群主和管理员在邀请成员加入群（通过操作<a href="NIM.html#createTeam"><code>创建群</code></a>或<a href="NIM.html#addTeamMembers"><code>拉人入群</code></a>）之后, 被邀请的人会收到一条类型为<code>'teamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为邀请方的帐号, <code>to</code>字段的值为对应的群ID, 此类系统通知的<code>attach</code>有一个字段<code>team</code>的值为被邀请进入的<a href="Team.html"><code>群</code></a>, 被邀请的人可以选择接受邀请或者拒绝邀请。<ul>
<li>如果<a href="NIM.html#acceptTeamInvite"><code>接受入群邀请</code></a>, 那么该群的所有群成员会收到一条类型为<code>'acceptTeamInvite'</code>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 此类群通知消息的<code>from</code>字段的值为接受入群邀请的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>members</code>的值为接收入群邀请的群成员列表。</li>
<li>如果<a href="NIM.html#rejectTeamInvite"><code>拒绝入群邀请</code></a>, 那么邀请你的人会收到一条类型为<code>'rejectTeamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝入群邀请的人的帐号, <code>to</code>字段的值为对应的群ID。</li>
</ul>
</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>accounts</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>要拉进群的成员的帐号列表</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>ps</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.addTeamMembers({<br>    teamId: '123',<br>    accounts: ['a3', 'a4'],<br>    ps: '加入我们的群吧',<br>    done: addTeamMembersDone<br>});<br>function addTeamMembersDone(error, obj) {<br>    console.log('入群邀请发送' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#acceptTeamInvite"><code>接受入群邀请</code></a></li>
        
            <li><a href="NIM.html#rejectTeamInvite"><code>拒绝入群邀请</code></a></li>
        
            <li><a href="NIM.html#removeTeamMembers"><code>踢人出群</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="addToBlacklist">
            
            addToBlacklist<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/relation.js, line 48
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>加入黑名单</p>
<ul>
<li>如果一个用户被加入了黑名单, 那么就不再会收到此用户发送的消息</li>
<li>SDK内部调用<a href="NIM.html#markInBlacklist"><code>nim.markInBlacklist</code></a>来完成实际工作</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要加入黑名单的账号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.addToBlacklist({<br>    account: 'account',<br>    done: addToBlacklistDone<br>});<br>function addToBlacklistDone(error, obj) {<br>    console.log('加入黑名单' + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        addToBlacklist(obj);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#markInBlacklist"><code>nim.markInBlacklist</code></a></li>
        
            <li><a href="NIM.html#removeFromBlacklist"><code>nim.removeFromBlacklist</code></a></li>
        
            <li><a href="NIM.html#getRelations"><code>nim.getRelations</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="addToMutelist">
            
            addToMutelist<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/relation.js, line 158
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>加入静音列表</p>
<ul>
<li>SDK只负责维护静音列表, 具体要根据静音列表进行的操作由开发者决定</li>
<li>SDK内部调用<a href="NIM.html#markInMutelist"><code>nim.markInMutelist</code></a>来完成实际工作</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要加入静音列表的账号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.addToMutelist({<br>    account: 'account',<br>    done: addToMutelistDone<br>});<br>function addToMutelistDone(error, obj) {<br>    console.log('加入静音列表' + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        addToMutelist(obj);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#markInMutelist"><code>nim.markInMutelist</code></a></li>
        
            <li><a href="NIM.html#removeFromMutelist"><code>nim.removeFromMutelist</code></a></li>
        
            <li><a href="NIM.html#getRelations"><code>nim.getRelations</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="applyFriend">
            
            applyFriend<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/friend.js, line 102
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>申请加为好友</p>
<ul>
<li><a href="NIM.html#applyFriend"><code>申请加某个用户为好友</code></a>后, 对方会收到一条类型为<code>'applyFriend'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为申请方的帐号, <code>to</code>字段的值为接收方的账号, 用户在收到好友申请后, 可以选择通过或者拒绝好友申请。<ul>
<li>如果<a href="NIM.html#passFriendApply"><code>通过好友申请</code></a>, 那么申请方会收到一条类型为<code>'passFriendApply'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类群通知消息的<code>from</code>字段的值为通过方的帐号, <code>to</code>字段的值为申请方的账号。</li>
<li>如果<a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a>, 那么申请方会收到一条类型为<code>'rejectFriendApply'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝方的帐号, <code>to</code>字段的值为申请方的账号。</li>
</ul>
</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>要申请加为好友的账号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>ps</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.applyFriend({<br>    account: 'account',<br>    ps: 'ps',<br>    done: applyFriendDone<br>});<br>function applyFriendDone(error, obj) {<br>    console.log('申请加为好友' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#applyFriend"><code>直接加为好友</code></a></li>
        
            <li><a href="NIM.html#passFriendApply"><code>通过好友申请</code></a></li>
        
            <li><a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a></li>
        
            <li><a href="NIM.html#deleteFriend"><code>删除好友</code></a></li>
        
            <li><a href="NIM.html#updateFriend"><code>更新好友</code></a></li>
        
            <li><a href="NIM.html#getFriends"><code>获取好友列表</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="applyTeam">
            
            applyTeam<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 330
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>申请入群</p>
<ul>
<li>用户可以主动<a href="NIM.html#applyTeam"><code>申请加入高级群</code></a>, 目标群的群主和管理员会收到一条类型为<code>'applyTeam'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为申请方的帐号, <code>to</code>字段的值为对应的群ID, 高级群的群主和管理员在收到入群申请后, 可以选择通过或者拒绝入群申请。<ul>
<li>如果<a href="NIM.html#passTeamApply"><code>通过入群申请</code></a>, 那么该群的所有群成员会收到一条类型为<code>'passTeamApply'</code>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 此类群通知消息的<code>from</code>字段的值为通过入群申请的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>account</code>包含了申请方的帐号, <code>attach</code>有一个字段<code>members</code>的值为被通过申请的群成员列表。</li>
<li>如果<a href="NIM.html#rejectTeamApply"><code>拒绝入群申请</code></a>, 那么申请人会收到一条类型为<code>'rejectTeamApply'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝方的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群</code></a>。</li>
</ul>
</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>ps</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数, 成功时会收到<a href="Team.html"><code>群资料</code></a></p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.applyTeam({<br>    teamId: '123',<br>    ps: '请加',<br>    done: applyTeamDone<br>});<br>function applyTeamDone(error, obj) {<br>    console.log('申请入群' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#passTeamApply"><code>通过入群申请</code></a></li>
        
            <li><a href="NIM.html#rejectTeamApply"><code>拒绝入群申请</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="audioToMp3">
            
            audioToMp3<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{String}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/nos.js, line 29
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>将音频 url 转为 mp3</p>
<ul>
<li>此方法会返回一个新的 url</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>url</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>url</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        String
                        
                    
            </td>
            <td class="description last">转为 mp3 后的 url</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var url = 'http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xMTQwMzFfMTQ1MTg4ODk5MjMxMV9mNmI1Y2QyZC03N2UzLTQxNmUtYWY5NC1iODlhZGY4ZTYzYWQ=';<br>var mp3Url = nim.audioToMp3({<br>    url: url<br>});<br>console.log(mp3Url);</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="audioToText">
            
            audioToText<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/audio.js, line 4
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>音频转文字</p>
<ul>
<li>仅支持通过<a href="NIM.html#previewFile"><code>previewFile</code></a>或者<a href="NIM.html#sendFile"><code>sendFile</code></a>拿到的音频 url, 或者收到的音频消息的 url</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>url</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>音频 url</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时会额外附上文本 text</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var url = 'http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ1MTg5MDI2MjY0MF9lYzk1MWMyZC1hMzRmLTQ1YzctYWI2ZS1kZWE2NTA2M2Q4NjY=';<br>nim.audioToText({<br>    url: url,<br>    done: audioToTextDone<br>});<br>function audioToTextDone(error, obj) {<br>    console.log('语音转文字' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="blurImage">
            
            blurImage<span class="signature">(options, radius, sigma)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/nos.js, line 151
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>高斯模糊图片</p>
<ul>
<li>只支持通过<a href="NIM.html#previewFile"><code>预览文件</code></a>或<a href="NIM.html#sendFile"><code>发送文件消息</code></a>拿到的图片 url, 或者经过其他图片操作后拿到的图片 url</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>url</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原图 url</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>radius</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>高斯模糊半径, 不包含中心点的像素, 取值范围 [1,50]</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>sigma</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>高斯模糊标准差, 不能小于 0</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时附上高斯模糊后的图片 url</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var url = 'http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=';<br>var blurUrl = nim.blurImage({<br>    url: url,<br>    radius: 5,<br>    sigma: 3,<br>    done: blurImageDone<br>});<br>function blurImageDone(error, obj) {<br>    console.log('高斯模糊图片' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="connect">
            
            connect<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/connect.js, line 18
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>登录 SDK</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.connect();</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#disconnect"><code>disconnect</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="createTeam">
            
            createTeam<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 14
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>创建群</p>
<ul>
<li><a href="Team.html#.type"><code>普通群</code></a>不可以设置<a href="Team.html#.joinMode"><code>群加入方式</code></a></li>
<li><a href="Team.html#.type"><code>高级群</code></a>的<a href="Team.html#.joinMode"><code>群加入方式</code></a>默认为<code>'needVerify'</code></li>
<li><a href="Team.html#.type"><code>高级群</code></a>的<a href="Team.html#.beInviteMode"><code>群被邀请模式</code></a>默认为<code>'needVerify'</code></li>
<li><a href="Team.html#.type"><code>高级群</code></a>的<a href="Team.html#.inviteMode"><code>群邀请模式</code></a>默认为<code>'manager'</code></li>
<li><a href="Team.html#.type"><code>高级群</code></a>的<a href="Team.html#.updateTeamMode"><code>群信息修改权限</code></a>默认为<code>'manager'</code></li>
<li><a href="Team.html#.type"><code>高级群</code></a>的<a href="Team.html#.updateCustomMode"><code>群信息自定义字段修改权限</code></a>默认为<code>'manager'</code></li>
<li><a href="Team.html#.type"><code>普通群</code></a>被邀请的<a href="TeamMember.html"><code>群成员</code></a>在有人说话之后才会看到该<a href="Team.html"><code>群</code></a>, 而且会先收到一条类型为<a href="IMMessage.html#.attach.type"><code>'addTeamMembers'</code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 然后会收到其它<a href="IMMessage.html#.scene"><code>群消息</code></a>。</li>
<li><a href="Team.html#.type"><code>高级群</code></a>被邀请的<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="SystemMessage.html#.type"><code>'teamInvite'</code></a>的<a href="SystemMessage.html"><code>系统通知</code></a>。<ul>
<li>接受邀请后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach.type"><code>'acceptTeamInvite'</code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。</li>
<li>拒绝邀请后, <code>群主</code>会收到一条类型为<a href="IMMessage.html#.attach.type"><code>'rejectTeamInvite'</code></a>的<a href="SystemMessage.html"><code>系统通知</code></a>。</li>
</ul>
</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>type</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p><a href="Team.html#.type"><code>群类型</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>name</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>群名字</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>avatar</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>群头像</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>accounts</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>要拉进群的成员的帐号列表</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>intro</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>群简介</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>announcement</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>群公告</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>joinMode</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p><a href="Team.html#.joinMode"><code>群加入方式</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>beInviteMode</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p><a href="Team.html#.beInviteMode"><code>群被邀请模式</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>inviteMode</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p><a href="Team.html#.inviteMode"><code>群邀请模式</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>updateTeamMode</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p><a href="Team.html#.updateTeamMode"><code>群信息修改权限</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>updateCustomMode</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>Team.updateCustomMode|群信息自定义字段修改权限}</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>custom</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>扩展字段</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>ps</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数, 成功时会收到<a href="Team.html"><code>群资料</code></a></p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>// 创建普通群<br>nim.createTeam({<br>    type: 'normal',<br>    name: '普通群',<br>    avatar: 'avatar',<br>    accounts: ['a1', 'a2'],<br>    ps: '我建了一个普通群',<br>    done: createTeamDone<br>});<br>// 创建高级群<br>nim.createTeam({<br>    type: 'advanced',<br>    name: '高级群',<br>    avatar: 'avatar',<br>    accounts: ['a1', 'a2'],<br>    intro: '群简介',<br>    announcement: '群公告',<br>    // joinMode: 'needVerify',<br>    // beInviteMode: 'needVerify',<br>    // inviteMode: 'manager',<br>    // updateTeamMode: 'manager',<br>    // updateCustomMode: 'manager',<br>    ps: '我建了一个高级群',<br>    done: createTeamDone<br>});<br>function createTeamDone(error, obj) {<br>    console.log('创建' + obj.team.type + '群' + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        onCreateTeam(obj.team, obj.owner);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#addTeamMembers"><code>拉人入群</code></a></li>
        
            <li><a href="NIM.html#removeTeamMembers"><code>踢人出群</code></a></li>
        
            <li><a href="NIM.html#updateTeam"><code>更新群</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="cropImage">
            
            cropImage<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/nos.js, line 179
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>裁剪图片</p>
<ul>
<li>只支持通过<a href="NIM.html#previewFile"><code>预览文件</code></a>或<a href="NIM.html#sendFile"><code>发送文件消息</code></a>拿到的图片 url, 或者经过其他图片操作后拿到的图片 url</li>
<li>从坐标 (x, y) 处截取尺寸为 width*height 的图片, (0, 0) 代表左上角</li>
<li>width/height 不能小于0, 如果 width/height 大于图片的原始宽度/高度, 那么将被替换为图片的原始宽度/高度</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>url</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原图 url</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>x</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Int</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>起点坐标 x, 必须需为整数, 此方法内部使用 Math.round 来格式化 x/y/width/height</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>y</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Int</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>起点坐标 y, 必须需为整数, 此方法内部使用 Math.round 来格式化 x/y/width/height</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>width</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Int</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>宽度, 必须需为整数, 此方法内部使用 Math.round 来格式化 x/y/width/height</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>height</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Int</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>高度, 必须需为整数, 此方法内部使用 Math.round 来格式化 x/y/width/height</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时附上裁剪后的图片的 url</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var url = 'http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=';<br>var cropUrl = nim.cropImage({<br>    url: url,<br>    x: 100,<br>    y: 0,<br>    width: 250,<br>    height: 250,<br>    done: function cropImageDone<br>});<br>function cropImageDone(error, obj) {<br>    console.log('裁剪图片' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="cutFriends">
            
            cutFriends<span class="signature">(olds, invalids)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="Friend.html">Friend</a>>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 200
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>去除好友</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含去除后的好友列表</li>
<li>去除时按照 <code>account</code> 的值去除</li>
<li>此方法内部调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {return olds;}
if (!invalids) {return olds;}
if (!NIM.util.isArray(invalids)) { invalids = [invalids]; }
if (!invalids.length) {return olds;}
var options = {
  keyPath: 'account'
};
NIM.util.cutObjArray(olds, invalids, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来去除好友</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>olds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原始好友数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>invalids</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="Friend.html">Friend</a></span>
|

<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待去除的好友或好友数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;<a href="Friend.html">Friend</a>>
                        
                    
            </td>
            <td class="description last">去除后的好友数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="cutFriendsByAccounts">
            
            cutFriendsByAccounts<span class="signature">(olds, invalids)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="Friend.html">Friend</a>>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 230
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>去除<code>accounts</code>对应的好友</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含去除后的好友列表</li>
<li>去除时按照 <code>account</code> 的值去除</li>
<li>此方法内部调用 <a href="NIM.html#cutFriends"><code>nim.cutFriends</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!NIM.util.isArray(accounts)) { accounts = [accounts]; }
var invalids = accounts.map(function(account) {
  return {
      account: account
  };
});
return nim.cutFriends(olds, invalids);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来去除好友</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>olds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原始好友数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>invalids</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="Friend.html">Friend</a></span>
|

<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待去除的好友或好友数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;<a href="Friend.html">Friend</a>>
                        
                    
            </td>
            <td class="description last">去除后的好友数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="cutLoginPorts">
            
            cutLoginPorts<span class="signature">(olds, invalids)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="LoginPort.html">LoginPort</a>>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 55
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>去除登录端</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含去除后的登录端列表</li>
<li>去除时按照 <code>account</code> 的值去除</li>
<li>此方法内部调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {return olds;}
if (!invalids) {return olds;}
if (!NIM.util.isArray(invalids)) { invalids = [invalids]; }
if (!invalids.length) {return olds;}
var options = {
  keyPath: 'account'
};
NIM.util.cutObjArray(olds, invalids, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来去除登录端</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>olds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="LoginPort.html">LoginPort</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原始登录端数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>invalids</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="LoginPort.html">LoginPort</a></span>
|

<span class="param-type">Array.&lt;<a href="LoginPort.html">LoginPort</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待去除的登录端或登录端数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;<a href="LoginPort.html">LoginPort</a>>
                        
                    
            </td>
            <td class="description last">去除后的登录端数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="cutRelations">
            
            cutRelations<span class="signature">(olds, invalids)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="Relation.html">Relation</a>>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 116
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>去除关系</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含去除后的关系列表</li>
<li>去除时按照 <code>account</code> 的值去除</li>
<li>此方法内部调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {return olds;}
if (!invalids) {return olds;}
if (!NIM.util.isArray(invalids)) { invalids = [invalids]; }
if (!invalids.length) {return olds;}
var options = {
  keyPath: 'account'
};
NIM.util.cutObjArray(olds, invalids, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来去除关系</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>olds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Relation.html">Relation</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原始关系数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>invalids</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="Relation.html">Relation</a></span>
|

<span class="param-type">Array.&lt;<a href="Relation.html">Relation</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待去除的关系或关系数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;<a href="Relation.html">Relation</a>>
                        
                    
            </td>
            <td class="description last">去除后的关系数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="cutTeamMembers">
            
            cutTeamMembers<span class="signature">(olds, invalids)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="TeamMember.html">TeamMember</a>>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 457
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>去除群成员</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含去除后的群成员列表</li>
<li>去除时按照 <code>id</code> 的值去除</li>
<li>此方法内部调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {return olds;}
if (!invalids) {return olds;}
if (!NIM.util.isArray(invalids)) { invalids = [invalids]; }
if (!invalids.length) {return olds;}
var options = {
};
NIM.util.cutObjArray(olds, invalids, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来去除群成员</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>olds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原始群成员数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>invalids</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="TeamMember.html">TeamMember</a></span>
|

<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待去除的群成员或群成员数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;<a href="TeamMember.html">TeamMember</a>>
                        
                    
            </td>
            <td class="description last">去除后的群成员数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="cutTeamMembersByAccounts">
            
            cutTeamMembersByAccounts<span class="signature">(olds, invalids)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="TeamMember.html">TeamMember</a>>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 485
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>去除<code>accounts</code>对应的群成员</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含去除后的群成员列表</li>
<li>去除时按照 <code>account</code> 的值去除</li>
<li>此方法内部调用 <a href="NIM.html#cutTeamMembers"><code>nim.cutTeamMembers</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!NIM.util.isArray(accounts)) { accounts = [accounts]; }
var invalids = TeamMember.assembleMembers({
  teamId: teamId
}, accounts);
return nim.cutTeamMembers(olds, invalids);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来去除群成员</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>olds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原始群成员数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>invalids</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="TeamMember.html">TeamMember</a></span>
|

<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待去除的群成员或群成员数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;<a href="TeamMember.html">TeamMember</a>>
                        
                    
            </td>
            <td class="description last">去除后的群成员数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="cutTeams">
            
            cutTeams<span class="signature">(olds, invalids)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="Team.html">Team</a>>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 371
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>去除群</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含去除后的群列表</li>
<li>去除时按照 <code>teamId</code> 的值去除</li>
<li>此方法内部调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {return olds;}
if (!invalids) {return olds;}
if (!NIM.util.isArray(invalids)) { invalids = [invalids]; }
if (!invalids.length) {return olds;}
var options = {
  keyPath: 'teamId'
};
NIM.util.cutObjArray(olds, invalids, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来去除群</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>olds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Team.html">Team</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原始群数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>invalids</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="Team.html">Team</a></span>
|

<span class="param-type">Array.&lt;<a href="Team.html">Team</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待去除的群或群数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;<a href="Team.html">Team</a>>
                        
                    
            </td>
            <td class="description last">去除后的群数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="deleteAllLocalMsgs">
            
            deleteAllLocalMsgs<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 1171
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除所有本地消息</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
<li>此方法同时会清空所有的会话, 请开发者自己清空内存里面的会话列表</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.deleteAllLocalMsgs({<br>    done: deleteAllLocalMsgsDone<br>});<br>function deleteAllLocalMsgsDone(error, obj) {<br>    console.log('删除所有本地消息' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="deleteAllLocalSysMsgs">
            
            deleteAllLocalSysMsgs<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/sysMsg.js, line 337
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除所有本地系统通知</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.deleteAllLocalSysMsgs({<br>    done: deleteAllLocalSysMsgsDone<br>});<br>function deleteAllLocalSysMsgsDone(error, obj) {<br>    console.log(error);<br>    console.log(obj);<br>    console.log('删除所有本地系统通知' + (!error?'成功':'失败'));<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="deleteFriend">
            
            deleteFriend<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/friend.js, line 226
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除好友</p>
<ul>
<li><a href="NIM.html#deleteFriend"><code>删除好友</code></a>后, 被删除的人会收到一条类型为<code>'deleteFriend'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为删除方的帐号, <code>to</code>字段的值为被删除方的账号。</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要删除好友的账号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.deleteFriend({<br>    account: 'account',<br>    done: deleteFriendDone<br>});<br>function deleteFriendDone(error, obj) {<br>    console.log('删除好友' + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        onDeleteFriend(obj.account);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#deleteFriend"><code>直接加为好友</code></a></li>
        
            <li><a href="NIM.html#applyFriend"><code>申请加为好友</code></a></li>
        
            <li><a href="NIM.html#passFriendApply"><code>通过好友申请</code></a></li>
        
            <li><a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a></li>
        
            <li><a href="NIM.html#updateFriend"><code>更新好友</code></a></li>
        
            <li><a href="NIM.html#getFriends"><code>获取好友列表</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="deleteLocalMsg">
            
            deleteLocalMsg<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 1084
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除本地消息</p>
<ul>
<li>在<a href="support.html#.db"><code>支持数据库</code></a>时<ul>
<li>如果删除的是对应会话的最后一条消息, 那么对应会话的 <code>lastMsg</code> 属性会自动变为变为上一条消息, 同时触发 <code>onupdatesession</code> 回调</li>
<li>如果对应的消息不存在, 算成功</li>
</ul>
</li>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>msg</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="IMMessage.html">IMMessage</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待删除的消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.deleteLocalMsg({<br>    msg: msg,<br>    done: deleteLocalMsgDone<br>});<br>function deleteLocalMsgDone(error, obj) {<br>    console.log('删除本地消息' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="deleteLocalMsgsBySession">
            
            deleteLocalMsgsBySession<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 1124
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除某个会话的本地消息</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>scene</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>to</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>聊天对象, 账号或者群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.deleteLocalMsgsBySession({<br>    scene: 'p2p',<br>    to: 'account',<br>    done: deleteLocalMsgsBySessionDone<br>});<br>function deleteLocalMsgsBySession(error, obj) {<br>    console.log('删除会话本地消息' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="deleteLocalSession">
            
            deleteLocalSession<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/session.js, line 267
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除本地会话</p>
<ul>
<li>在<a href="support.html#.db"><code>支持数据库</code></a>时, 删了本地会话之后, 下次同步就同步不到对应的会话</li>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
<li>如果对应的会话不存在, 算成功</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>id</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>会话 id 或 id 数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.deleteLocalSession({<br>    id: 'p2p-account',<br>    done: deleteLocalSessionDone<br>});<br>function deleteLocalSessionDone(error, obj) {<br>    console.log('删除本地会话' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="deleteLocalSysMsg">
            
            deleteLocalSysMsg<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/sysMsg.js, line 291
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除本地系统通知</p>
<ul>
<li>删除 <code>idServer</code> 对应的本地系统通知</li>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
<li>如果对应的系统通知不存在, 算成功</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>idServer</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>idServer 或 idServer 数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.deleteLocalSysMsg({<br>    idServer: '1234',<br>    done: deleteLocalSysMsgDone<br>});<br>function deleteLocalSysMsgDone(error, obj) {<br>    console.log(error);<br>    console.log(obj);<br>    console.log('删除本地系统通知' + (!error?'成功':'失败'));<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="deleteLocalTeam">
            
            deleteLocalTeam<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 1077
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除 <code>teamId</code> 对应的本地群</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
<li>如果当前用户还在群里面, 那么会失败</li>
<li>如果对应的群不存在, 算成功</li>
<li>如果传了多个 teamId, 但是当前用户还在某个群里面, 那么会失败, 但是所有用户不在的群都会被删掉</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>teamId 或者 teamId 数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.deleteLocalTeam({<br>    teamId: '1234',<br>    done: deleteLocalTeamDone<br>});<br>function deleteLocalTeamDone(error, obj) {<br>    console.log('删除本地群' + (!error?'成功':'失败'));<br>    console.log(error);<br>    console.log(obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="deleteMsg">
            
            deleteMsg<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 603
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>撤回消息</p>
<ul>
<li><a href="NIM.html#deleteMsg"><code>撤回消息</code></a>后, 消息接收方会收到一条类型为<code>'deleteMsg'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的 <code>msg</code> 为被删除的消息的部分字段。如果是群消息, 那么群里的所有人都会收到这条系统通知. 如果同时在多个端登录了同一个账号, 那么其它端也会收到这条系统通知.</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>msg</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="IMMessage.html">IMMessage</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待撤回的消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.deleteMsg({<br>  msg: someMsg,<br>  done: deleteMsgDone<br>})<br>console.log('正在撤回消息', someMsg)<br>function deleteMsgDone (error) {<br>  console.log('撤回消息' + (!error?'成功':'失败'), error);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="deleteSession">
            
            deleteSession<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/session.js, line 313
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>删除服务器上的会话</p>
<ul>
<li>删了服务器上的会话之后, 在不<a href="support.html#.db"><code>支持数据库</code></a>时, 下次同步就同步不到对应的会话以及会话对应的漫游消息; 此外, 在新设备上也同步不到对应的会话以及会话对应的漫游消息</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>scene</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>to</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>对方账号或群ID</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.deleteSession({<br>    scene: 'p2p',<br>    to: 'account',<br>    done: deleteSessionDone<br>});<br>function deleteSessionDone(error, obj) {<br>    console.log('删除会话' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#deleteSessions"><code>批量删除服务器上的会话</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="deleteSessions">
            
            deleteSessions<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/session.js, line 348
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>批量删除服务器上的会话</p>
<ul>
<li>删了服务器上的会话之后, 在不<a href="support.html#.db"><code>支持数据库</code></a>时, 下次同步就同步不到对应的会话以及会话对应的漫游消息; 此外, 在新设备上也同步不到对应的会话以及会话对应的漫游消息</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>sessions</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Session.html">Session</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>会话列表</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.deleteSessions({<br>    sessions: {[<br>        scene: 'p2p',<br>        to: 'account'<br>    ], [<br>        scene: 'p2p',<br>        to: 'account1'<br>    ]},<br>    done: deleteSessionsDone<br>});<br>function deleteSessionsDone(error, obj) {<br>    console.log('批量删除会话' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#deleteSession"><code>删除服务器上的会话</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="disconnect">
            
            disconnect<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/connect.js, line 32
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>登出 SDK</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.disconnect();</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#connect"><code>connect</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="dismissTeam">
            
            dismissTeam<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 745
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>解散群</p>
<ul>
<li><a href="NIM.html#dismissTeam"><code>解散群</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach.type"><code><code>'dismissTeam'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段为解散群的人的帐号, <code>to</code>字段的值为被对应的群ID。</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.dismissTeam({<br>    teamId: '123',<br>    done: dismissTeamDone<br>});<br>function dismissTeamDone(error, obj) {<br>    console.log('解散群' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="findFriend">
            
            findFriend<span class="signature">(friends, account)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Friend.html">Friend</a>|null}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 263
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>在好友数组里面根据 <code>account</code> 找到对应的好友</p>
<ul>
<li>此方法内部调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>NIM.util.findObjInArray(friends, {
  keyPath: 'account',
  value: account
});</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来查找某个好友</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>friends</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>好友数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待查找的好友的 <code>account</code></p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Friend.html">Friend</a>
                         | 
                    
                        null
                        
                    
            </td>
            <td class="description last">对应的好友或者 null</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="findMsg">
            
            findMsg<span class="signature">(msgs, idClient)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="global.html#Message">Message</a>|null}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 652
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>在消息数组里面根据 <code>idClient</code> 找到对应的消息</p>
<ul>
<li>此方法内部调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>NIM.util.findObjInArray(msgs, {
  keyPath: 'idClient',
  value: idClient
});</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来查找某个消息</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>msgs</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="global.html#Message">Message</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>消息数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>idClient</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待查找的消息的 <code>idClient</code></p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="global.html#Message">Message</a>
                         | 
                    
                        null
                        
                    
            </td>
            <td class="description last">对应的消息或者 null</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="findRelation">
            
            findRelation<span class="signature">(relations, account)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Relation.html">Relation</a>|null}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 146
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>在关系数组里面根据 <code>account</code> 找到对应的关系</p>
<ul>
<li>此方法内部调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>NIM.util.findObjInArray(relations, {
  keyPath: 'account',
  value: account
});</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来查找某个关系</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>relations</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Relation.html">Relation</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>关系数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待查找的关系的 <code>account</code></p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Relation.html">Relation</a>
                         | 
                    
                        null
                        
                    
            </td>
            <td class="description last">对应的关系或者 null</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="findSession">
            
            findSession<span class="signature">(sessions, sessionId)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Session.html">Session</a>|null}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 582
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>在会话数组里面根据 <code>id</code> 找到对应的会话</p>
<ul>
<li>此方法内部调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>NIM.util.findObjInArray(sessions, {
  keyPath: 'id',
  value: sessionId
});</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来查找某个会话</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>sessions</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Session.html">Session</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>会话数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>sessionId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待查找的会话的 <code>id</code></p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Session.html">Session</a>
                         | 
                    
                        null
                        
                    
            </td>
            <td class="description last">对应的会话或者 null</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="findSysMsg">
            
            findSysMsg<span class="signature">(sysMsgs, idServer)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="SystemMessage.html">SystemMessage</a>|null}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 722
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>在系统通知数组里面根据 <code>idServer</code> 找到对应的系统通知</p>
<ul>
<li>此方法内部调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>NIM.util.findObjInArray(sysMsgs, {
  keyPath: 'idServer',
  value: idServer
});</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来查找某个系统通知</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>sysMsgs</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="SystemMessage.html">SystemMessage</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>系统通知数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>idServer</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待查找的系统通知的 <code>idServer</code></p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="SystemMessage.html">SystemMessage</a>
                         | 
                    
                        null
                        
                    
            </td>
            <td class="description last">对应的系统通知或者 null</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="findTeam">
            
            findTeam<span class="signature">(teams, teamId)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Team.html">Team</a>|null}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 401
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>在群数组里面根据 <code>teamId</code> 找到对应的群</p>
<ul>
<li>此方法内部调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>NIM.util.findObjInArray(teams, {
  keyPath: 'teamId',
  value: teamId
});</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来查找某个群</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teams</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Team.html">Team</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待查找的群的 <code>teamId</code></p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="Team.html">Team</a>
                         | 
                    
                        null
                        
                    
            </td>
            <td class="description last">对应的群或者 null</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="findTeamMember">
            
            findTeamMember<span class="signature">(members, id)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="TeamMember.html">TeamMember</a>|null}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 514
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>在群成员数组里面根据 <code>id</code> 找到对应的群成员</p>
<ul>
<li>此方法内部调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>NIM.util.findObjInArray(members, {
  keyPath: 'id',
  value: id
});</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来查找某个群成员</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>members</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群成员数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>id</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待查找的群成员的 <code>id</code></p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="TeamMember.html">TeamMember</a>
                         | 
                    
                        null
                        
                    
            </td>
            <td class="description last">对应的群成员或者 null</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="findUser">
            
            findUser<span class="signature">(users, account)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="User.html">User</a>|null}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 317
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>在名片数组里面根据 <code>account</code> 找到对应的名片</p>
<ul>
<li>此方法内部调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>NIM.util.findObjInArray(users, {
  keyPath: 'account',
  value: account
});</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来查找某个名片</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>users</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="User.html">User</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>名片数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待查找的名片的 <code>account</code></p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="User.html">User</a>
                         | 
                    
                        null
                        
                    
            </td>
            <td class="description last">对应的名片或者 null</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="forwardMsg">
            
            forwardMsg<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 466
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>转发消息</p>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>msg</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="IMMessage.html">IMMessage</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待转发的消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>scene</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>新的<a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>to</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>新的接收方, 对方帐号或者群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.forwardMsg({<br>  msg: someMsg,<br>  scene: 'p2p',<br>  to: 'account',<br>  done: sendMsgDone<br>})<br>console.log('正在转发消息', someMsg)</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getChatroomAddress">
            
            getChatroomAddress<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/chatroom.js, line 4
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取聊天室服务器地址</p>
<ul>
<li>可以在 IM 连接上获取聊天室服务器地址</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>chatroomId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>聊天室 id</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.getChatroomAddress({<br>    chatroomId: 'chatroomId',<br>    done: getChatroomAddressDone<br>});<br>function getChatroomAddressDone(error, obj) {<br>    console.log('获取聊天室地址' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getFriends">
            
            getFriends<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/friend.js, line 305
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取好友列表</p>
<ul>
<li>如果开发者在<a href="NIM.html"><code>初始化SDK</code></a>的时候设置了<code>syncFriends</code>为<code>false</code>, 那么就收不到<code>onfriends</code>回调, 可以调用此接口来获取好友列表。</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功的时候会收到<a href="Friend.html"><code>好友</code></a>列表</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.getFriends({<br>    done: getFriendsDone<br>});<br>function getFriendsDone(error, friends) {<br>    console.log('获取好友列表' + (!error?'成功':'失败'), error, friends);<br>    if (!error) {<br>        onFriends(friends);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#addFriend"><code>直接加为好友</code></a></li>
        
            <li><a href="NIM.html#applyFriend"><code>申请加为好友</code></a></li>
        
            <li><a href="NIM.html#passFriendApply"><code>通过好友申请</code></a></li>
        
            <li><a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a></li>
        
            <li><a href="NIM.html#deleteFriend"><code>删除好友</code></a></li>
        
            <li><a href="NIM.html#updateFriend"><code>更新好友</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getHistoryMsgs">
            
            getHistoryMsgs<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 662
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取云端历史记录</p>
<ul>
<li>该接口用于获取一段时间内的历史消息, 由参数<code>beginTime</code>和<code>endTime</code>来控制时间范围。<ul>
<li>当<code>reverse</code>为<code>false</code>时, 后续查询的<code>endTime</code>对应上次查询的最后一条消息的<code>time</code>字段</li>
<li>当<code>reverse</code>为<code>true</code>时, 后续查询的<code>beginTime</code>对应上次查询的最后一条消息的<code>time</code>字段</li>
</ul>
</li>
<li>如果要搜索历史消息, 请参考<code>获取包含关键词的历史消息</code></li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>scene</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>请参考<a href="IMMessage.html#.scene"><code>消息场景</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>to</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>聊天对象, 账号或者群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>beginTime</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>时间戳, 开始时间, 精确到ms, 默认为0</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>endTime</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>时间戳, 结束时间, 精确到ms, 默认为服务器的当前时间</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>lastMsgId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>上次查询的最后一条消息的<code>idServer</code>, 第一次不填</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>limit</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>本次查询的消息数量限制, 最多100条, 默认100条</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>reverse</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    false
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>默认<code>false</code>表示从<code>endTime</code>开始往前查找历史消息;<br>                                             <code>true</code>表示从<code>beginTime</code>开始往后查找历史消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>asc</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    false
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>默认<code>false</code>表示返回的消息按时间逆序排序;<br>                                             <code>true</code>表示按时间正序排序</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数, 成功时会额外附上<a href="IMMessage.html"><code>消息</code></a>列表</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.getHistoryMsgs({<br>    scene: 'p2p',<br>    to: 'account',<br>    done: getHistoryMsgsDone<br>});<br>function getHistoryMsgsDone(error, obj) {<br>    console.log('获取云端历史记录' + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        console.log(obj.msgs);<br>    }<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getLocalMsgByIdClient">
            
            getLocalMsgByIdClient<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 931
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取 idClient 对应的本地消息</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功, 返回 null</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>idClient</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>idClient</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时会额外附上<a href="IMMessage.html"><code>消息</code></a></p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.getLocalMsgByIdClient({<br>    idClient: 'd7a1b2c63066e1038e9aa01321652370',<br>    done: getLocalMsgByIdClientDone<br>});<br>function getLocalMsgByIdClientDone(error, obj) {<br>    console.log('获取本地消息' + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        console.log(obj.msg);<br>    }<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getLocalMsgs">
            
            getLocalMsgs<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 852
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取本地历史记录</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功, 返回空数组</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>sessionId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>如果提供该参数, 那么查询该会话的消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>sessionIds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>如果提供该参数, 那么查询这几个会话的消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>start</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
                <td class="default">
                
                    0
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>开始时间</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>end</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
                <td class="default">
                
                    Infinity
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>结束时间</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>desc</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>true 表示从 end 开始查, false 表示从 begin 开始查</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>limit</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
                <td class="default">
                
                    100
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>limit 数量限制</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>type</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p><a href="IMMessage.html#.type"><code>消息类型</code></a>, 如果提供该参数, 那么查询该类型的消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>types</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>如果提供该参数, 那么查询这几种类型的消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>keyword</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>如果提供参数, 那么查询匹配该关键词的消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>filterFunc</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>可选参数, 过滤函数, 接收消息对象, 返回 true 表示结果保留该消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数, 成功时会附上<a href="IMMessage.html"><code>消息</code></a>列表</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.getLocalMsgs({<br>  sessionId: 'p2p-account'<br>  limit: 100,<br>  done: getLocalMsgsDone<br>})<br>function getLocalMsgsDone(error, obj) {<br>  console.log('获取本地消息' + (!error?'成功':'失败'), error, obj)<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getLocalMsgsByIdClients">
            
            getLocalMsgsByIdClients<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 979
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取 idClients 对应的本地消息</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功, 返回空数组</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>idClients</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>idClients</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时会额外附上<a href="IMMessage.html"><code>消息</code></a>列表</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.getLocalMsgsByIdClients({<br>    idClients: [<br>        'd7a1b2c63066e1038e9aa01321652370',<br>        '22e604c7811c23586355f63f24658525'<br>    ],<br>    done: getLocalMsgsByIdClientsDone<br>});<br>function getLocalMsgsByIdClientsDone(error, obj) {<br>    console.log('获取本地消息' + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        console.log(obj.msgs);<br>    }<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getLocalSessions">
            
            getLocalSessions<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/session.js, line 150
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取本地会话列表</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 返回空数组</li>
<li>会话列表按时间逆序排列, 即最近聊过天的放在列表的最前面</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>lastSessionId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>上次查询的最后一条会话的<code>id</code>, 第一次不填</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>limit</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>本次查询的会话数量限制, 最多 100 条, 默认 100 条</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>reverse</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    false
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>默认<code>false</code>表示从最近的会话开始往前查找本地会话；<br>                                             <code>true</code>表示从第一条会话开始往后查找本地会话</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.getLocalSessions({<br>    lastSessionId: lastSessionId,<br>    limit: 100,<br>    done: getLocalSessionsDone<br>});<br>function getLocalSessionsDone(error, obj) {<br>    console.log('获取本地会话列表' + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        onSessions(obj.sessions);<br>    }<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getLocalSysMsgs">
            
            getLocalSysMsgs<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/sysMsg.js, line 159
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取本地系统通知</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功, 返回空数组</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>category</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p><a href="SystemMessage.html#.category"><code>种类</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>type</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p><a href="SystemMessage.html#.type"><code>类型</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>read</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>可选</p>
<ul>
<li>如果不传, 默认获取所有已读和未读的系统通知</li>
<li>如果传 <code>true</code>, 那么只获取已读的系统通知</li>
<li>如果传 <code>false</code>, 那么只获取未读的系统通知</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>lastIdServer</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>上次查询的最后一条系统通知的<code>idServer</code>, 第一次不填</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>limit</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>本次查询的消息数量限制, 最多 100 条, 默认 100 条</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>reverse</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    false
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>默认<code>false</code>表示从最近的系统通知开始往前查找本地系统通知；<br>                                             <code>true</code>表示从第一条系统通知开始往后查找本地系统通知</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数, 成功时会额外附上<a href="SystemMessage.html"><code>系统通知</code></a>列表</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.getLocalSysMsgs({<br>    lastIdServer: 'lastIdServer',<br>    limit: 100,<br>    done: getLocalSysMsgsDone<br>});<br>function getLocalSysMsgsDone(error, obj) {<br>    console.log(error);<br>    console.log(obj);<br>    console.log('获取本地系统通知' + (!error?'成功':'失败'));<br>    if (!error) {<br>        console.log(obj.sysMsgs);<br>    }<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getLocalTeams">
            
            getLocalTeams<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 1000
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取<code>teamIds</code>对应的本地群</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamIds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>teamId 数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时会额外附上群列表</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.getLocalTeams({<br>    teamIds: teamIds<br>    done: getLocalTeamsDone<br>});<br>function getLocalTeamsDone(error, obj) {<br>    console.log('获取本地群' + (!error?'成功':'失败'));<br>    console.log(error);<br>    console.log(obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getMutedTeamMembers">
            
            getMutedTeamMembers<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 646
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取群禁言成员列表</p>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群 ID</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.getMutedTeamMembers({<br>  teamId: 'teamId',<br>  done: getMutedTeamMembersDone<br>})<br>function getMutedTeamMembersDone (error, obj) {<br>  console.log('获取群禁言成员列表' + (!error?'成功':'失败'));<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getPushNotificationMultiportConfig">
            
            getPushNotificationMultiportConfig<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="global.html#PushNotificationMultiportConfig">PushNotificationMultiportConfig</a>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/notification.js, line 14
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取当前多端推送配置选项</p>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="global.html#PushNotificationMultiportConfig">PushNotificationMultiportConfig</a>
                        
                    
            </td>
            <td class="description last">多端推送配置选项</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getRelations">
            
            getRelations<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/relation.js, line 226
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取黑名单和静音列表</p>
<ul>
<li>如果开发者在<a href="NIM.html"><code>初始化SDK</code></a>的时候设置了<code>syncRelations</code>为<code>false</code>, 那么就收不到<code>onblacklist</code>和<code>onmutelist</code>回调, 可以调用此接口来获取黑名单和静音列表。</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时会返回黑名单和静音列表</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.getRelations({<br>    done: getRelationsDone<br>});<br>function getRelationsDone(error, obj) {<br>    console.log('获取静音列表' + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        onBlacklist(obj.blacklist);<br>        onMutelist(obj.mutelist);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#addToBlacklist"><code>nim.addToBlacklist</code></a></li>
        
            <li><a href="NIM.html#removeFromBlacklist"><code>nim.removeFromBlacklist</code></a></li>
        
            <li><a href="NIM.html#markInBlacklist"><code>nim.markInBlacklist</code></a></li>
        
            <li><a href="NIM.html#addToMutelist"><code>nim.addToMutelist</code></a></li>
        
            <li><a href="NIM.html#removeFromMutelist"><code>nim.removeFromMutelist</code></a></li>
        
            <li><a href="NIM.html#markInMutelist"><code>nim.markInMutelist</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getTeam">
            
            getTeam<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 776
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取群</p>
<ul>
<li>开发者可以调用此接口获取群资料</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时会收到<a href="Team.html"><code>群资料</code></a></p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.getTeam({<br>    teamId: '123',<br>    done: getTeamDone<br>});<br>function getTeamDone(error, obj) {<br>    console.log(error);<br>    console.log(obj);<br>    console.log('获取群' + (!error?'成功':'失败'));<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#getTeams"><code>获取群列表</code></a></li>
        
            <li><a href="NIM.html#getTeamMembers"><code>获取群成员</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getTeamMembers">
            
            getTeamMembers<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 881
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取群成员</p>
<ul>
<li>如果开发者在<a href="NIM.html"><code>初始化SDK</code></a>时选择设置了<code>syncTeamMembers</code>为<code>false</code>, 那么就收不到<code>onteammembers</code>回调, 可以调用此方法来获取<a href="TeamMember.html"><code>群成员</code></a>列表</li>
<li>接受入群邀请之后调用此方法来获取<a href="TeamMember.html"><code>群成员</code></a>列表</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时会额外附上<a href="TeamMember.html"><code>群成员</code></a>列表</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.getTeamMembers({<br>    teamId: '123',<br>    done: getTeamMembersDone<br>});<br>function getTeamMembersDone(error, obj) {<br>    console.log(error);<br>    console.log(obj);<br>    console.log('获取群成员' + (!error?'成功':'失败'));<br>    if (!error) {<br>        onTeamMembers(obj);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#getTeam"><code>获取群资料</code></a></li>
        
            <li><a href="NIM.html#getTeams"><code>获取群列表</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getTeams">
            
            getTeams<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 837
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取群列表</p>
<ul>
<li>如果开发者在<a href="NIM.html"><code>初始化SDK</code></a>的时候设置了<code>syncTeams</code>为<code>false</code>, 那么就收不到<code>onteams</code>回调, 可以调用此接口来获取<a href="Team.html"><code>群</code></a>列表</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时会收到<a href="Team.html"><code>群</code></a>列表</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.getTeams({<br>    done: getTeamsDone<br>});<br>function getTeamsDone(error, teams) {<br>    console.log(error);<br>    console.log(teams);<br>    console.log('获取群列表' + (!error?'成功':'失败'));<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#getTeam"><code>获取群资料</code></a></li>
        
            <li><a href="NIM.html#getTeamMembers"><code>获取群成员</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getUser">
            
            getUser<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/user.js, line 76
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取用户名片</p>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>账号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时会返回用户名片</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.getUser({<br>    account: 'account',<br>    done: getUserDone<br>});<br>function getUserDone(error, user) {<br>    console.log('获取用户名片' + (!error?'成功':'失败'), error, obj);<br>    if (!error &amp;&amp; user) {<br>        onUsers(user);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#getUser"><code>获取用户名片</code></a></li>
        
            <li><a href="NIM.html#getUsers"><code>获取用户名片数组</code></a></li>
        
            <li><a href="NIM.html#updateMyInfo"><code>更新登录用户的名片</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="getUsers">
            
            getUsers<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/user.js, line 143
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>获取用户名片数组</p>
<ul>
<li>每次最多 150 个</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>accounts</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>账号数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时会返回用户名片列表</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.getUsers({<br>    accounts: ['account1', 'account2'],<br>    done: getUsersDone<br>});<br>function getUsersDone(error, users) {<br>    console.log('获取用户名片数组' + (!error?'成功':'失败'), error, users);<br>    if (!error &amp;&amp; users.length) {<br>        onUsers(users);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#getUser"><code>获取用户名片</code></a></li>
        
            <li><a href="NIM.html#getUsers"><code>获取用户名片数组</code></a></li>
        
            <li><a href="NIM.html#updateMyInfo"><code>更新登录用户的名片</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="insertLocalSession">
            
            insertLocalSession<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/session.js, line 100
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>插入一条本地会话记录</p>
<ul>
<li>如果会话已存在, 那么会返回错误</li>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 那么算成功</li>
<li>如果有对应会话的本地历史消息, 那么会更新会话的 <code>lastMsg</code> 为最后一条消息</li>
<li>插入成功后, 会触发<code>onupdatesession</code>回调</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>scene</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p><a href="Session.html"><code>会话</code></a><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>option.to</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p><a href="Session.html"><code>会话</code></a>对象, 账号或群ID</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.updateTime</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>可选, 会话更新的时间, 如果不填, SDK 会设置一个比当前所有会话更新时间大的一个时间</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数, 如果成功会额外附上生成的会话对象</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.insertLocalSession({<br>    scene: 'p2p',<br>    to: 'account',<br>    done: insertLocalSessionDone<br>});<br>function insertLocalSessionDone(error, obj) {<br>    console.log('插入本地会话记录' + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        onSessions(obj.session);<br>    }<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="interlaceImage">
            
            interlaceImage<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/nos.js, line 100
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>interlace 图片</p>
<ul>
<li>只支持通过<a href="NIM.html#previewFile"><code>预览文件</code></a>或<a href="NIM.html#sendFile"><code>发送文件消息</code></a>拿到的图片 url, 或者经过其他图片操作后拿到的图片 url</li>
<li>在网络环境较差时, interlace 后的图片会以从模糊到清晰的方式呈现给用户</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>url</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原图 url</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时附上 interlace 后的图片 url</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var url = 'http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=';<br>var interlaceUrl = nim.interlaceImage({<br>    url: url,<br>    done: interlaceImageDone<br>});<br>function interlaceImageDone(error, obj) {<br>    console.log('interlace 图片' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="isMsgRemoteRead">
            
            isMsgRemoteRead<span class="signature">(msg)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Boolean}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 585
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>查询消息是否被对方读过了</p>
<ul>
<li>目前只支持<a href="IMMessage.html#.scene"><code>'p2p'</code></a>会话</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>msg</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="IMMessage.html">IMMessage</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>消息</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Boolean
                        
                    
            </td>
            <td class="description last">是否被对方读过</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var isRemoteRead = nim.isMsgRemoteRead(msg);</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="kick">
            
            kick<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/connect.js, line 46
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>踢当前用户登录的其它端</p>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>deviceIds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要踢掉的端的设备号数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时会收到被踢掉的设备号数组</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.kick({<br>    deviceIds: ['device1'],<br>    done: onKick<br>});<br>function onKick(error, obj) {<br>    console.log('踢其它端' + (!error?'成功':'失败'));<br>    console.log(error);<br>    console.log(obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="leaveTeam">
            
            leaveTeam<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 673
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>主动退群</p>
<ul>
<li><a href="NIM.html#leaveTeam"><code>主动退群</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach.type"><code><code>'leaveTeam'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为退群的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>。</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.leaveTeam({<br>    teamId: '123',<br>    done: leaveTeamDone<br>});<br>function leaveTeamDone(error, obj) {<br>    console.log('主动退群' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="markInBlacklist">
            
            markInBlacklist<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/relation.js, line 4
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>加入黑名单/从黑名单移除</p>
<ul>
<li>此接口可以完成以下两个功能, 通过参数<code>isAdd</code>来决定实际的功能<ul>
<li><code>isAdd</code>为<code>true</code>时, 会将<code>account</code><a href="NIM.html#addToBlacklist"><code>加入黑名单</code></a><ul>
<li>如果一个用户被加入了黑名单, 那么就不再会收到此用户发送的消息</li>
</ul>
</li>
<li><code>isAdd</code>为<code>false</code>时, 会将<code>account</code><a href="NIM.html#removeFromBlacklist"><code>从黑名单移除</code></a><ul>
<li>如果一个用户被从黑名单移除, 那么会重新收到此用户发送的消息</li>
</ul>
</li>
</ul>
</li>
<li>每个功能SDK都提供了相应的独立接口</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要加入黑名单/从黑名单移除的账号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isAdd</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p><code>true</code>表示加入黑名单, <code>false</code>表示从黑名单移除</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.markInBlacklist({<br>    account: 'account',<br>    // <code>true</code>表示加入黑名单, <code>false</code>表示从黑名单移除<br>    isAdd: true,<br>    done: markInBlacklistDone<br>});<br>function markInBlacklistDone(error, obj) {<br>    console.log('将' + obj.account + (isAdd ? '加入黑名单' : '从黑名单移除') + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        onMarkInBlacklist(obj);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#addToBlacklist"><code>nim.addToBlacklist</code></a></li>
        
            <li><a href="NIM.html#removeFromBlacklist"><code>nim.removeFromBlacklist</code></a></li>
        
            <li><a href="NIM.html#getRelations"><code>nim.getRelations</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="markInMutelist">
            
            markInMutelist<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/relation.js, line 116
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>加入静音列表/从静音列表移除</p>
<ul>
<li>此接口可以完成以下两个功能, 通过参数<code>isAdd</code>来决定实际的功能<ul>
<li><code>isAdd</code>为<code>true</code>时, 会将<code>account</code><a href="NIM.html#addToMutelist"><code>加入静音列表</code></a></li>
<li><code>isAdd</code>为<code>false</code>时, 会将<code>account</code><a href="NIM.html#removeFromMutelist"><code>从静音列表移除</code></a></li>
</ul>
</li>
<li>每个功能SDK都提供了相应的独立接口</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要加入静音列表/从静音列表移除的账号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isAdd</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p><code>true</code>表示加入静音列表, <code>false</code>表示从静音列表移除</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.markInMutelist({<br>    account: 'account',<br>    // <code>true</code>表示加入静音列表, <code>false</code>表示从静音列表移除<br>    isAdd: 'true',<br>    done: markInMutelistDone<br>});<br>function markInMutelistDone(error, obj) {<br>    console.log('将' + obj.account + (isAdd ? '加入静音列表' : '从静音列表移除') + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        onMarkInMutelist(obj);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#addToMutelist"><code>nim.addToMutelist</code></a></li>
        
            <li><a href="NIM.html#removeFromMutelist"><code>nim.removeFromMutelist</code></a></li>
        
            <li><a href="NIM.html#getRelations"><code>nim.getRelations</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="markMsgRead">
            
            markMsgRead<span class="signature">(msgs)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 494
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>标记消息为已收到</p>
<ul>
<li>如果没有消息、或者支持数据库、或者设置了自动标记, 那么直接返回</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>msgs</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="IMMessage.html">IMMessage</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待标记的消息或者消息数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.markMsgRead(someMsg);<br>// or<br>nim.markMsgRead([someMsg]);</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="markSysMsgRead">
            
            markSysMsgRead<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/sysMsg.js, line 8
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>标记系统通知为已收到</p>
<ul>
<li>SDK 在收到系统通知后会更新系统通知未读数, 开发者需要调用此接口来通知 SDK 将某条系统通知标记为已读状态, 标记后会触发<code>onupdatesysmsgunread</code>回调</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>sysMsgs</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="SystemMessage.html">SystemMessage</a></span>
|

<span class="param-type">Array.&lt;<a href="SystemMessage.html">SystemMessage</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>通过<code>onofflinesysmsgs</code>或者<code>onsysmsg</code>接收到的系统通知或者系统通知数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.markSysMsgRead({<br>    sysMsgs: someSysMsg,<br>    done: markSysMsgReadDone<br>});<br>function markSysMsgReadDone(error, obj) {<br>    console.log(error);<br>    console.log(obj);<br>    console.log('标记系统通知为已收到' + (!error?'成功':'失败'));<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="mergeFriends">
            
            mergeFriends<span class="signature">(olds, news)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="Friend.html">Friend</a>>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 170
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>合并好友</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的好友列表</li>
<li>合并时按照 <code>account</code> 的值去重，按照 <code>account</code> 的值正序排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
  keyPath: 'account'
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并好友</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>olds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原始好友数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>news</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="Friend.html">Friend</a></span>
|

<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待合并的好友或好友数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;<a href="Friend.html">Friend</a>>
                        
                    
            </td>
            <td class="description last">合并后的好友数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="mergeLoginPorts">
            
            mergeLoginPorts<span class="signature">(olds, news)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="LoginPort.html">LoginPort</a>>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 25
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>合并登录端</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的登录端列表</li>
<li>合并时按照 <code>deviceId</code> 的值去重，按照 <code>deviceId</code> 的值正序排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
  keyPath: 'deviceId'
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并登录端</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>olds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="LoginPort.html">LoginPort</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原始登录端数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>news</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="LoginPort.html">LoginPort</a></span>
|

<span class="param-type">Array.&lt;<a href="LoginPort.html">LoginPort</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待合并的登录端或登录端数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;<a href="LoginPort.html">LoginPort</a>>
                        
                    
            </td>
            <td class="description last">合并后的登录端数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="mergeMsgs">
            
            mergeMsgs<span class="signature">(olds, news)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="global.html#Message">Message</a>>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 606
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>合并消息</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的消息列表</li>
<li>合并时按照 <code>idClient</code> 的值去重，按照 <code>time</code> 的值排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
  keyPath: 'idClient',
  sortPath: 'time'
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并消息</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>olds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="global.html#Message">Message</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原始消息数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>news</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#Message">Message</a></span>
|

<span class="param-type">Array.&lt;<a href="global.html#Message">Message</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待合并的消息或消息数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;<a href="global.html#Message">Message</a>>
                        
                    
            </td>
            <td class="description last">合并后的消息数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="mergeRelations">
            
            mergeRelations<span class="signature">(olds, news)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="Relation.html">Relation</a>>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 86
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>合并关系</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的关系列表</li>
<li>合并时按照 <code>account</code> 的值去重，按照 <code>account</code> 的值正序排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
  keyPath: 'account'
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并关系</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>olds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Relation.html">Relation</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原始关系数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>news</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="Relation.html">Relation</a></span>
|

<span class="param-type">Array.&lt;<a href="Relation.html">Relation</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待合并的关系或关系数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;<a href="Relation.html">Relation</a>>
                        
                    
            </td>
            <td class="description last">合并后的关系数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="mergeSessions">
            
            mergeSessions<span class="signature">(olds, news)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="Session.html">Session</a>>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 538
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>合并会话</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的会话列表</li>
<li>合并时按照 <code>id</code> 的值去重，按照 <code>updateTime</code> 的值倒序排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
  sortPath: 'updateTime',
  desc: true
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并会话</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>olds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Session.html">Session</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原始会话数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>news</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="Session.html">Session</a></span>
|

<span class="param-type">Array.&lt;<a href="Session.html">Session</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待合并的会话或会话数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;<a href="Session.html">Session</a>>
                        
                    
            </td>
            <td class="description last">合并后的会话数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="mergeSysMsgs">
            
            mergeSysMsgs<span class="signature">(olds, news)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="SystemMessage.html">SystemMessage</a>>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 676
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>合并系统通知</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的系统通知列表</li>
<li>合并时按照 <code>idServer</code> 的值去重，按照 <code>idServer</code> 的值倒序排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
  keyPath: 'idServer',
  desc: true
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并系统通知</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>olds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="SystemMessage.html">SystemMessage</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原始系统通知数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>news</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="SystemMessage.html">SystemMessage</a></span>
|

<span class="param-type">Array.&lt;<a href="SystemMessage.html">SystemMessage</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待合并的系统通知或系统通知数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;<a href="SystemMessage.html">SystemMessage</a>>
                        
                    
            </td>
            <td class="description last">合并后的系统通知数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="mergeTeamMembers">
            
            mergeTeamMembers<span class="signature">(olds, news)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="TeamMember.html">TeamMember</a>>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 429
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>合并群成员</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的群成员列表</li>
<li>合并时按照 <code>id</code> 的值去重，按照 <code>id</code> 的值正序排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并群成员</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>olds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原始群成员数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>news</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="TeamMember.html">TeamMember</a></span>
|

<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待合并的群成员或群成员数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;<a href="TeamMember.html">TeamMember</a>>
                        
                    
            </td>
            <td class="description last">合并后的群成员数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="mergeTeams">
            
            mergeTeams<span class="signature">(olds, news)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="Team.html">Team</a>>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 341
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>合并群</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的群列表</li>
<li>合并时按照 <code>teamId</code> 的值去重，按照 <code>teamId</code> 的值正序排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
  keyPath: 'teamId'
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并群</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>olds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Team.html">Team</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原始群数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>news</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="Team.html">Team</a></span>
|

<span class="param-type">Array.&lt;<a href="Team.html">Team</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待合并的群或群数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;<a href="Team.html">Team</a>>
                        
                    
            </td>
            <td class="description last">合并后的群数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="mergeUsers">
            
            mergeUsers<span class="signature">(olds, news)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.&lt;<a href="User.html">User</a>>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/model.js, line 287
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>合并名片</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的名片列表</li>
<li>合并时按照 <code>account</code> 的值去重，按照 <code>account</code> 的值正序排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
  keyPath: 'account'
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并名片</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>olds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="User.html">User</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原始名片数组</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>news</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="User.html">User</a></span>
|

<span class="param-type">Array.&lt;<a href="User.html">User</a>></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待合并的名片或名片数组</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Array.&lt;<a href="User.html">User</a>>
                        
                    
            </td>
            <td class="description last">合并后的名片数组</td>
        </tr>
    
    </tbody>
</table>

    
    
    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="notifyForNewTeamMsg">
            
            notifyForNewTeamMsg<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 948
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>是否需要群消息通知</p>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamIds</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群列表</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时会附上一个 map, key 是群 ID, value 是一个布尔值, 表示该群是否需要群消息通知</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.notifyForNewTeamMsg({<br>    teamIds: ['123'],<br>    done: notifyForNewTeamMsgDone<br>})<br>function notifyForNewTeamMsgDone(error, map) {<br>    console.log(error);<br>    console.log(map);<br>    console.log('查询是否需要群消息通知' + (!error?'成功':'失败'));<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="packFileDownloadName">
            
            packFileDownloadName<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{String}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/nos.js, line 9
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>修改图片下载的名字</p>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>url</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原图 url</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>name</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>下载的名字</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        String
                        
                    
            </td>
            <td class="description last">修改图片下载名字后的图片 url</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var url = 'http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=';<br>var nameUrl = nim.packFileDownloadName({<br>    url: url,<br>    name: '测试.jpg'<br>});<br>console.log(nameUrl);</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="passFriendApply">
            
            passFriendApply<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/friend.js, line 139
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>通过好友申请</p>
<ul>
<li><a href="NIM.html#applyFriend"><code>申请加某个用户为好友</code></a>后, 对方会收到一条类型为<code>'applyFriend'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为申请方的帐号, <code>to</code>字段的值为接收方的账号, 用户在收到好友申请后, 可以选择通过或者拒绝好友申请。<ul>
<li>如果<a href="NIM.html#passFriendApply"><code>通过好友申请</code></a>, 那么申请方会收到一条类型为<code>'passFriendApply'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类群通知消息的<code>from</code>字段的值为通过方的帐号, <code>to</code>字段的值为申请方的账号。</li>
<li>如果<a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a>, 那么申请方会收到一条类型为<code>'rejectFriendApply'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝方的帐号, <code>to</code>字段的值为申请方的账号。</li>
</ul>
</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>idServer</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>对应的系统通知的 <code>idServer</code></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>要通过好友申请的账号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>ps</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>// 假设 sysMsg 是通过回调 <code>onsysmsg</code> 收到的系统通知<br>nim.passFriendApply({<br>    idServer: sysMsg.idServer,<br>    account: 'account',<br>    ps: 'ps',<br>    done: passFriendApplyDone<br>});<br>function passFriendApplyDone(error, obj) {<br>    console.log('通过好友申请' + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        onAddFriend(obj.friend);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#passFriendApply"><code>直接加为好友</code></a></li>
        
            <li><a href="NIM.html#applyFriend"><code>申请加为好友</code></a></li>
        
            <li><a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a></li>
        
            <li><a href="NIM.html#deleteFriend"><code>删除好友</code></a></li>
        
            <li><a href="NIM.html#updateFriend"><code>更新好友</code></a></li>
        
            <li><a href="NIM.html#getFriends"><code>获取好友列表</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="passTeamApply">
            
            passTeamApply<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 370
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>通过入群申请</p>
<ul>
<li>用户可以主动<a href="NIM.html#applyTeam"><code>申请加入高级群</code></a>, 目标群的群主和管理员会收到一条类型为<code>'applyTeam'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为申请方的帐号, <code>to</code>字段的值为对应的群ID, 高级群的群主和管理员在收到入群申请后, 可以选择通过或者拒绝入群申请。<ul>
<li>如果<a href="NIM.html#passTeamApply"><code>通过入群申请</code></a>, 那么该群的所有群成员会收到一条类型为<code>'passTeamApply'</code>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 此类群通知消息的<code>from</code>字段的值为通过入群申请的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>account</code>包含了申请方的帐号, <code>attach</code>有一个字段<code>members</code>的值为被通过申请的群成员列表。</li>
<li>如果<a href="NIM.html#rejectTeamApply"><code>拒绝入群申请</code></a>, 那么申请人会收到一条类型为<code>'rejectTeamApply'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝方的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群</code></a>。</li>
</ul>
</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>idServer</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>对应的系统通知的 <code>idServer</code></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群ID</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>from</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>申请方的帐号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>// 假设 sysMsg 是通过回调 <code>onsysmsg</code> 收到的系统通知<br>nim.passTeamApply({<br>    idServer: sysMsg.idServer,<br>    teamId: '123',<br>    from: 'a2',<br>    done: passTeamApplyDone<br>});<br>function passTeamApplyDone(error, obj) {<br>    console.log('通过入群申请' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#applyTeam"><code>申请入群</code></a></li>
        
            <li><a href="NIM.html#rejectTeamApply"><code>拒绝入群申请</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="previewFile">
            
            previewFile<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 80
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>预览文件</p>
<ul>
<li>开发者可以预览文件, 支持以下几种场景<ul>
<li>通过参数<code>fileInput</code>传入文件选择 dom 节点或者节点 ID, SDK 会读取该节点下的文件, 在上传完成前请不要操作该节点下的文件</li>
<li>通过参数<code>blob</code>传入 Blob 对象</li>
<li>通过参数<code>dataURL</code>传入包含 MIME type 和 base64 数据的 data URL, 此用法需要浏览器支持 Blob</li>
</ul>
</li>
<li>SDK会将文件上传到文件服务器, 然后将拿到的文件对象在<code>done</code>回调中传给开发者, 文件对象有以下几种<ul>
<li><a href="Image.html"><code>图片对象</code></a></li>
<li><a href="Audio.html"><code>音频对象</code></a></li>
<li><a href="Video.html"><code>视频对象</code></a></li>
<li><a href="File.html"><code>文件对象</code></a></li>
</ul>
</li>
<li>开发者在拿到文件对象之后, 可以调用<a href="NIM.html#sendFile"><code>发送文件消息</code></a>来发送文件消息。</li>
<li>文件大小限制为最大 100M<ul>
<li>高级浏览器会在上传前就检测文件大小</li>
<li>IE8/IE9 会在上传完成后检测文件大小</li>
</ul>
</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>type</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>文件过滤器</p>
<ul>
<li>image会过滤掉非图片的文件, audio过滤掉非音频, video会过滤掉非视频的文件</li>
<li>IE8/IE9 不支持文件过滤</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>fileInput</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Node</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>文件选择 dom 节点或者节点 ID, SDK 会读取该节点下的文件, 在上传完成前请不要操作该节点下的文件</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>blob</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Blob</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>Blob 对象</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>dataURL</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>包含 MIME type 和 base64 数据的 data URL</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>uploadprogress</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#uploadprogress">uploadprogress</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>上传进度, ie9以下不支持上传进度</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数, 成功时会收到文件对象, 请参考</p>
<ul>
<li><a href="Image.html"><code>图片对象</code></a></li>
<li><a href="Audio.html"><code>音频对象</code></a></li>
<li><a href="Video.html"><code>视频对象</code></a></li>
<li><a href="File.html"><code>文件对象</code></a></li>
</ul></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.previewFile({<br>    type: 'image',<br>    fileInput: fileInput,<br>    uploadprogress: function(obj) {<br>        console.log('文件总大小: ' + obj.total + 'bytes');<br>        console.log('已经上传的大小: ' + obj.loaded + 'bytes');<br>        console.log('上传进度: ' + obj.percentage);<br>        console.log('上传进度文本: ' + obj.percentageText);<br>    },<br>    done: function(error, file) {<br>        console.log('上传image' + (!error?'成功':'失败'));<br>        // show file to the user<br>        if (!error) {<br>            var msg = nim.sendFile({<br>                scene: 'p2p',<br>                to: 'account',<br>                file: file,<br>                done: sendMsgDone<br>            });<br>            console.log('正在发送p2p image消息, id=' + msg.idClient);<br>            pushMsg(msg);<br>        }<br>    }<br>});</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="processImage">
            
            processImage<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/nos.js, line 261
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>处理图片</p>
<p>此方法接收一组图片操作, 按操作顺序依次处理图片, 可选的操作包括：</p>
<ul>
<li><a href="NIM.html#qualityImage"><code>修改图片质量</code></a></li>
<li><a href="NIM.html#interlaceImage"><code>interlace 图片</code></a></li>
<li><a href="NIM.html#rotateImage"><code>旋转图片</code></a></li>
<li><a href="NIM.html#blurImage"><code>高斯模糊图片</code></a></li>
<li><a href="NIM.html#cropImage"><code>裁剪图片</code></a></li>
<li><a href="NIM.html#thumbnailImage"><code>生成缩略图</code></a></li>
<li><a href="NIM.html#previewFile"><code>预览文件</code></a></li>
<li><a href="NIM.html#sendFile"><code>发送文件消息</code></a></li>
</ul>
<p>每个操作所需的参数请参考上面的各个方法, 除了上面方法列出来的参数之外, 每个操作需要提供操作类型, 分别是</p>
<ul>
<li><code>'quality'</code></li>
<li><code>'interlace'</code></li>
<li><code>'rotate'</code></li>
<li><code>'blur'</code></li>
<li><code>'crop'</code></li>
<li><code>'thumbnail'</code></li>
</ul>
<p>请参考下面的示例代码</p>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>url</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原图 url</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>ops</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>操作序列</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时附上处理后的图片 url</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>// 裁剪后旋转<br>var url = 'http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=';<br>nim.processImage({<br>    url: url,<br>    ops: [<br>        {<br>            type: 'crop',<br>            x: 100,<br>            y: 0,<br>            width: 250,<br>            height: 250,<br>        },<br>        {<br>            type: 'thumbnail',<br>            mode: 'cover',<br>            width: 80,<br>            height: 80<br>        }<br>    ],<br>    done: processImageDone<br>});<br>function processImageDone(error, obj) {<br>    console.log('处理图片' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="qualityImage">
            
            qualityImage<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/nos.js, line 73
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>修改图片质量</p>
<ul>
<li>只支持通过<a href="NIM.html#previewFile"><code>预览文件</code></a>或<a href="NIM.html#sendFile"><code>发送文件消息</code></a>拿到的图片 url, 或者经过其他图片操作后拿到的图片 url</li>
<li>默认图片质量为100, 开发者可以降低图片质量来省流量</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>url</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原图 url</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>quality</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Int</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>图片质量, 必须为整数, 取值范围为 0-100, 此方法内部使用 Math.round 来格式化 quality</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时附上修改质量后的图片 url</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var url = 'http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=';<br>var qualityUrl = nim.qualityImage({<br>    url: url,<br>    quality: 20,<br>    done: qualityImageDone<br>});<br>function qualityImageDone(error, obj) {<br>    console.log('修改图片质量' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="rejectFriendApply">
            
            rejectFriendApply<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/friend.js, line 183
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>拒绝好友申请</p>
<ul>
<li><a href="NIM.html#applyFriend"><code>申请加某个用户为好友</code></a>后, 对方会收到一条类型为<code>'applyFriend'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为申请方的帐号, <code>to</code>字段的值为接收方的账号, 用户在收到好友申请后, 可以选择通过或者拒绝好友申请。<ul>
<li>如果<a href="NIM.html#passFriendApply"><code>通过好友申请</code></a>, 那么申请方会收到一条类型为<code>'passFriendApply'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类群通知消息的<code>from</code>字段的值为通过方的帐号, <code>to</code>字段的值为申请方的账号。</li>
<li>如果<a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a>, 那么申请方会收到一条类型为<code>'rejectFriendApply'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝方的帐号, <code>to</code>字段的值为申请方的账号。</li>
</ul>
</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>idServer</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>对应的系统通知的 <code>idServer</code></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>要拒绝好友申请的账号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>ps</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>// 假设 sysMsg 是通过回调 <code>onsysmsg</code> 收到的系统通知<br>nim.rejectFriendApply({<br>    idServer: sysMsg.idServer,<br>    account: 'account',<br>    ps: 'ps',<br>    done: rejectFriendApplyDone<br>});<br>function rejectFriendApplyDone(error, obj) {<br>    console.log(error);<br>    console.log(obj);<br>    console.log('拒绝好友申请' + (!error?'成功':'失败'));<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#rejectFriendApply"><code>直接加为好友</code></a></li>
        
            <li><a href="NIM.html#applyFriend"><code>申请加为好友</code></a></li>
        
            <li><a href="NIM.html#passFriendApply"><code>通过好友申请</code></a></li>
        
            <li><a href="NIM.html#deleteFriend"><code>删除好友</code></a></li>
        
            <li><a href="NIM.html#updateFriend"><code>更新好友</code></a></li>
        
            <li><a href="NIM.html#getFriends"><code>获取好友列表</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="rejectTeamApply">
            
            rejectTeamApply<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 413
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>拒绝入群申请</p>
<ul>
<li>用户可以主动<a href="NIM.html#applyTeam"><code>申请加入高级群</code></a>, 目标群的群主和管理员会收到一条类型为<code>'applyTeam'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为申请方的帐号, <code>to</code>字段的值为对应的群ID, 高级群的群主和管理员在收到入群申请后, 可以选择通过或者拒绝入群申请。<ul>
<li>如果<a href="NIM.html#passTeamApply"><code>通过入群申请</code></a>, 那么该群的所有群成员会收到一条类型为<code>'passTeamApply'</code>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 此类群通知消息的<code>from</code>字段的值为通过入群申请的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>account</code>包含了申请方的帐号, <code>attach</code>有一个字段<code>members</code>的值为被通过申请的群成员列表。</li>
<li>如果<a href="NIM.html#rejectTeamApply"><code>拒绝入群申请</code></a>, 那么申请人会收到一条类型为<code>'rejectTeamApply'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝方的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群</code></a>。</li>
</ul>
</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>idServer</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>对应的系统通知的 <code>idServer</code></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>群ID</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>from</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>申请方的帐号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>ps</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>// 假设 sysMsg 是通过回调 <code>onsysmsg</code> 收到的系统通知<br>nim.rejectTeamApply({<br>    idServer: sysMsg.idServer,<br>    teamId: '123',<br>    from: 'a2',<br>    ps: '就不',<br>    done: rejectTeamApplyDone<br>});<br>function rejectTeamApplyDone(error, obj) {<br>    console.log('拒绝入群申请' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#applyTeam"><code>申请入群</code></a></li>
        
            <li><a href="NIM.html#passTeamApply"><code>通过入群申请</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="rejectTeamInvite">
            
            rejectTeamInvite<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 283
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>拒绝入群邀请</p>
<ul>
<li>高级群的群主和管理员在邀请成员加入群（通过操作<a href="NIM.html#createTeam"><code>创建群</code></a>或<a href="NIM.html#addTeamMembers"><code>拉人入群</code></a>）之后, 被邀请的人会收到一条类型为<code>'teamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为邀请方的帐号, <code>to</code>字段的值为对应的群ID, 此类系统通知的<code>attach</code>有一个字段<code>team</code>的值为被邀请进入的<a href="Team.html"><code>群</code></a>, 被邀请的人可以选择接受邀请或者拒绝邀请。<ul>
<li>如果<a href="NIM.html#acceptTeamInvite"><code>接受入群邀请</code></a>, 那么该群的所有群成员会收到一条类型为<code>'acceptTeamInvite'</code>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 此类群通知消息的<code>from</code>字段的值为接受入群邀请的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>members</code>的值为接收入群邀请的群成员列表。</li>
<li>如果<a href="NIM.html#rejectTeamInvite"><code>拒绝入群邀请</code></a>, 那么邀请你的人会收到一条类型为<code>'rejectTeamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝入群邀请的人的帐号, <code>to</code>字段的值为对应的群ID。</li>
</ul>
</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>idServer</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>对应的系统通知的 <code>idServer</code></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>from</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>邀请方的帐号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>ps</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>// 假设 sysMsg 是通过回调 <code>onsysmsg</code> 收到的系统通知<br>nim.rejectTeamInvite({<br>    idServer: sysMsg.idServer,<br>    teamId: '123',<br>    from: 'zyy1',<br>    ps: '就不',<br>    done: rejectTeamInviteDone<br>});<br>function rejectTeamInviteDone(error, obj) {<br>    console.log('拒绝入群邀请' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#acceptTeamInvite"><code>接受入群邀请</code></a></li>
        
            <li><a href="NIM.html#addTeamMembers"><code>拉人入群</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="removeFromBlacklist">
            
            removeFromBlacklist<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/relation.js, line 82
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>从黑名单移除</p>
<ul>
<li>如果一个用户被从黑名单移除, 那么会重新收到此用户发送的消息</li>
<li>SDK内部调用<a href="NIM.html#markInBlacklist"><code>nim.markInBlacklist</code></a>来完成实际工作</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要从黑名单移除的账号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.removeFromBlacklist({<br>    account: 'account',<br>    done: removeFromBlacklistDone<br>});<br>function removeFromBlacklistDone(error, obj) {<br>    console.log('从黑名单移除' + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        removeFromBlacklist(obj);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#markInBlacklist"><code>nim.markInBlacklist</code></a></li>
        
            <li><a href="NIM.html#addToBlacklist"><code>nim.addToBlacklist</code></a></li>
        
            <li><a href="NIM.html#getRelations"><code>nim.getRelations</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="removeFromMutelist">
            
            removeFromMutelist<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/relation.js, line 192
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>从静音列表移除</p>
<ul>
<li>SDK只负责维护静音列表, 具体要根据静音列表进行的操作由开发者决定</li>
<li>SDK内部调用<a href="NIM.html#markInMutelist"><code>nim.markInMutelist</code></a>来完成实际工作</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要从静音列表移除的账号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.removeFromMutelist({<br>    account: 'account',<br>    done: removeFromMutelistDone<br>});<br>function removeFromMutelistDone(error, obj) {<br>    console.log('从静音列表移除' + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        removeFromMutelist(obj);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#markInMutelist"><code>nim.markInMutelist</code></a></li>
        
            <li><a href="NIM.html#addToMutelist"><code>nim.addToMutelist</code></a></li>
        
            <li><a href="NIM.html#getRelations"><code>nim.getRelations</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="removeTeamManagers">
            
            removeTeamManagers<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 497
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>移除群管理员</p>
<ul>
<li><a href="NIM.html#removeTeamManagers"><code>移除群管理员</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach.type"><code><code>'removeTeamManagers'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为移除群管理员的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>accounts</code>的值为被移除的管理员的帐号列表, <code>attach</code>有一个字段<code>members</code>的值为被移除管理员的群成员列表。</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>accounts</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要移除的管理员帐号列表</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.removeTeamManagers({<br>    teamId: '123',<br>    accounts: ['a2', 'a3'],<br>    done: removeTeamManagersDone<br>});<br>function removeTeamManagersDone(error, obj) {<br>    console.log('移除群管理员' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#addTeamManagers"><code>添加群管理员</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="removeTeamMembers">
            
            removeTeamMembers<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 202
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>踢人出群</p>
<ul>
<li><a href="NIM.html#removeTeamMembers"><code>踢人出群</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach.type"><code><code>'removeTeamMembers'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为踢人的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>accounts</code>的值为被踢的人的帐号列表。</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>accounts</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要移除的成员帐号列表</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.removeTeamMembers({<br>    teamId: '123',<br>    accounts: ['a3', 'a4'],<br>    done: removeTeamMembersDone<br>});<br>function removeTeamMembersDone(error, obj) {<br>    console.log('踢人出群' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#addTeamMembers"><code>拉人入群</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="resendMsg">
            
            resendMsg<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 446
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>重发消息</p>
<ul>
<li>如果消息发送失败, 那么可以重发消息</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>msg</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="IMMessage.html">IMMessage</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>待重发的消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.resendMsg({<br>  msg: someMsg,<br>  done: sendMsgDone<br>})<br>console.log('正在重发消息', someMsg)</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="resetCurrSession">
            
            resetCurrSession<span class="signature">()</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/session.js, line 86
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>重置当前会话</p>
<ul>
<li>重置当前会话后, 所有会话在收到消息之后会更新未读数</li>
</ul>
    </div>
    

    
    
    
    
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.resetCurrSession();</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="resetSessionUnread">
            
            resetSessionUnread<span class="signature">(sessionId)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/session.js, line 35
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>重置某个会话的未读数</p>
<ul>
<li>如果是已经存在的会话记录, 会将此会话未读数置为 0, 那么会收到<code>onupdatesession</code>回调</li>
<li>之后此会话在收到消息之后依然会更新未读数</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>sessionId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>会话ID</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.resetSessionUnread('sessionId');</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="rotateImage">
            
            rotateImage<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/nos.js, line 125
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>旋转图片</p>
<ul>
<li>只支持通过<a href="NIM.html#previewFile"><code>预览文件</code></a>或<a href="NIM.html#sendFile"><code>发送文件消息</code></a>拿到的图片 url, 或者经过其他图片操作后拿到的图片 url</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>url</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原图 url</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>angle</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Int</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>旋转的角度, 正整数表示顺时针, 负整数表示逆时针, 必须为整数, 此方法内部会先将 angle 格式化为 [0, 360] 范围内的数字, 然后使用 Math.round 来格式化 angle</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时附上旋转后的图片的 url</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var url = 'http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=';<br>var rotateUrl = nim.rotateImage({<br>    url: url,<br>    angle: 90,<br>    done: rotateImageDone<br>});<br>function rotateImageDone(error, obj) {<br>    console.log('旋转图片' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="sendCustomMsg">
            
            sendCustomMsg<span class="signature">(options, <span class="optional">apns</span>)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="global.html#Message">Message</a>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 257
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>发送自定义消息</p>
<ul>
<li>自定义消息是<a href="IMMessage.html#.type"><code>消息类型</code></a>的一种</li>
<li>下面的代码用自定义消息实现了<code>石头剪刀布</code>游戏</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>scene</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>to</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>接收方, 对方帐号或者群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>content</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>自定义消息的消息内容, 推荐使用JSON格式构建</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>resend</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否是重发</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>idClient</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>如果是重发, 那么需要带上之前生成的idClient来标记这条消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>custom</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>扩展字段</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>pushContent</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>自定义推送文案</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>pushPayload</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>自定义的推送属性</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>apns</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>特殊推送选项, 只在群会话中使用</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>accounts</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>需要特殊推送的账号列表, 不填表示推送给当前会话内的所有用户</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>content</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>需要特殊推送的文案, 不填的话默认为 pushContent</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>forcePush</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否强制推送, true 表示即使推送列表中的胡勇屏蔽了当前会话（如静音）, 仍能够推送当前这条内容给相应用户</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isHistoryable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否存储云端历史</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isRoamingable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否支持漫游</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isSyncable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否支持发送者多端同步</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.cc</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否支持抄送</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isPushable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否需要推送</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isOfflinable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否要存离线</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isUnreadable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否计入消息未读数</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.needPushNick</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否需要推送昵称</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isLocal</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    false
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否是本地消息</p>
<ul>
<li><code>true</code>表示本地消息, 那么SDK并不会发送此条消息, 而是直接调用回调表示发送成功, 并更新对应的会话</li>
</ul></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="global.html#Message">Message</a>
                        
                    
            </td>
            <td class="description last"><a href="IMMessage.html"><code>消息</code></a></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var value = Math.ceil(Math.random()*3);<br>var content = {<br>    type: 1,<br>    data: {<br>        value: value<br>    }<br>};<br>var msg = nim.sendCustomMsg({<br>    scene: 'p2p',<br>    to: 'account',<br>    content: JSON.stringify(content),<br>    done: sendMsgDone<br>});<br>console.log('正在发送p2p自定义消息, id=' + msg.idClient);<br>pushMsg(msg);</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="sendCustomSysMsg">
            
            sendCustomSysMsg<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{String}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/sysMsg.js, line 78
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>发送自定义系统通知</p>
<ul>
<li>开发者可以向其他用户或群发送自定义通知。</li>
<li>自定义系统通知和自定义消息的区别如下<ul>
<li>自定义消息属于<a href="IMMessage.html"><code>消息</code></a>, 会存储在云信的消息数据库中, 需要跟其他<a href="IMMessage.html"><code>消息</code></a>一同展现给用户。</li>
<li>自定义系统通知属于<a href="SystemMessage.html"><code>系统通知</code></a>, 用于第三方通知自己, 不会存储在云信的数据库中, SDK不会解析这些通知, SDK仅仅负责传递这些通知。</li>
</ul>
</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>scene</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>场景跟<a href="IMMessage.html#.scene"><code>消息场景</code></a>的一样, 分为<code>p2p(点对点)</code>和<code>team(群)</code>。</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>to</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Number</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>接收方, 帐号或者群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>content</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>自定义系统通知的内容, 推荐使用JSON格式构建</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>apnsText</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>apns推送文案, 仅对接收方为iOS设备有效</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>pushPayload</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>自定义系统通知的推送属性</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>sendToOnlineUsersOnly</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否只发送给在线用户。<br>                                                                 true时只发送给在线用户, 如果接收方不在线, 这条通知将被丢弃。<br>                                                                 适合发送即时通知, 比如正在输入。<br>                                                                 false时假如接收方在线, 那么会立即收到该通知,<br>                                                                 假如接收方不在线, 会在其上线后推送过去。</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>cc</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否抄送</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>isPushable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否需要推送</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>needPushNick</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    false
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否需要推送昵称</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        String
                        
                    
            </td>
            <td class="description last">SDK生成的ID</td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var content = {<br>    type: 'type',<br>    value: 'value'<br>};<br>content = JSON.stringify(content);<br>var msgId = nim.sendCustomSysMsg({<br>    scene: 'p2p',<br>    to: 'account',<br>    content: content,<br>    sendToOnlineUsersOnly: false,<br>    apnsText: content,<br>    done: sendCustomSysMsgDone<br>});<br>console.log('正在发送p2p自定义系统通知, id=' + msgId);<br>function sendCustomSysMsgDone(error, msg) {<br>    console.log(error);<br>    console.log(msg);<br>    console.log('发送' + msg.scene + '自定义系统通知' + (!error?'成功':'失败') + ', id=' + msg.idClient);<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#sendCustomMsg"><code>发送自定义消息</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="sendFile">
            
            sendFile<span class="signature">(options, <span class="optional">apns</span>)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void|<a href="global.html#Message">Message</a>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 161
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>发送文件消息</p>
<ul>
<li>文件消息是<a href="IMMessage.html#.type"><code>消息类型</code></a>的一种</li>
<li>开发者可以直接发送文件消息<ul>
<li>支持以下几种场景<ul>
<li>通过参数<code>fileInput</code>传入文件选择 dom 节点或者节点 ID, SDK 会读取该节点下的文件, 在上传完成前请不要操作该节点下的文件</li>
<li>通过参数<code>blob</code>传入 Blob 对象</li>
<li>通过参数<code>dataURL</code>传入包含 MIME type 和 base64 数据的 data URL, 此用法需要浏览器支持 Blob</li>
</ul>
</li>
<li>SDK会先将文件上传到文件服务器, 然后把拿到的文件对象在<code>uploaddone</code>回调中传给用户, 然后将其拼装成文件消息发送出去。</li>
</ul>
</li>
<li>开发者也可以先<a href="NIM.html#previewFile"><code>预览文件</code></a>来获取文件对象, 然后调用此接口发送文件消息。<ul>
<li>通过参数<code>file</code>传入文件</li>
</ul>
</li>
<li>直接发送文件消息的话会在<code>beforesend</code>回调里面传入SDK生成的<code>idClient</code>, 如果先预览文件再发送, 那么此接口会直接返回<code>idClient</code></li>
<li>参数<code>type</code>指定了要发送的文件类型, 包括图片、音频、视频和普通文件, 对应的值分别为<code>'image'</code>、<code>'audio'</code>、<code>'video'</code>和<code>'file'</code>, 不传默认为<code>'file'</code>。</li>
<li>图片、音频、视频和普通文件的区别在于具体的文件信息不一样, 具体字段请参考<ul>
<li><a href="Image.html"><code>图片对象</code></a></li>
<li><a href="Audio.html"><code>音频对象</code></a></li>
<li><a href="Video.html"><code>视频对象</code></a></li>
<li><a href="File.html"><code>文件对象</code></a></li>
</ul>
</li>
<li>文件大小限制为最大100M<ul>
<li>高级浏览器会在上传前就检测文件大小</li>
<li>IE8和IE9会在上传完成后检测文件大小</li>
</ul>
</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>scene</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>to</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Number</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>接收方, 对方帐号或者群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>type</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>文件过滤器,<br>                                                         <code>'image'</code>会过滤掉非图片的文件, <code>'audio'</code>过滤掉非音频, <code>'video'</code>会过滤掉非视频的文件,<br>                                                         IE8/IE9 不支持文件过滤</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>fileInput</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Node</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>文件选择 dom 节点或者节点 ID, SDK 会读取该节点下的文件, 在上传完成前请不要操作该节点下的文件</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>blob</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Blob</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>Blob 对象</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>dataURL</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>MIME type 和 base64 数据的 data URL</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>file</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>文件对象, 开发者可以通过<a href="NIM.html#previewFile"><code>预览文件</code></a>拿到文件对象</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>wxFilePath</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>仅供微信小程序使用, 通过 wx.chooseImage 或者 wx.startRecord 拿到的临时文件路径</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>resend</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    false
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否是重发</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>beginupload</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>开始上传图片的回调</p>
<ul>
<li>如果开发者传入 fileInput, 在此回调之前不能修改 fileInput</li>
<li>在此回调之后可以取消图片上传, 此回调会接收一个参数 <code>upload</code>, 调用 <code>upload.abort();</code> 来取消文件上传</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>uploadprogress</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#uploadprogress">uploadprogress</a></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>上传进度, IE9以下不支持上传进度</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>uploaddone</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#uploaddone">uploaddone</a></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>上传完成回调</p>
<ul>
<li>此回调接收两个参数, error 和 obj</li>
<li>如果出错, error 包含详细的错误信息</li>
<li>如果上传成功, obj 包含详细的文件信息</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>beforesend</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#beforesend">beforesend</a></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>发送文件消息之前的回调函数</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>resend</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否是重发</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>idClient</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>如果是重发, 那么需要带上之前生成的idClient来标记这条消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>custom</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>扩展字段</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>pushContent</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>自定义推送文案</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>pushPayload</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>自定义的推送属性</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>apns</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>特殊推送选项, 只在群会话中使用</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>accounts</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>需要特殊推送的账号列表, 不填表示推送给当前会话内的所有用户</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>content</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>需要特殊推送的文案, 不填的话默认为 pushContent</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>forcePush</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否强制推送, true 表示即使推送列表中的胡勇屏蔽了当前会话（如静音）, 仍能够推送当前这条内容给相应用户</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isHistoryable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否存储云端历史</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isRoamingable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否支持漫游</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isSyncable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否支持发送者多端同步</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.cc</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否支持抄送</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isPushable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否需要推送</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isOfflinable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否要存离线</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isUnreadable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否计入消息未读数</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.needPushNick</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否需要推送昵称</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isLocal</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    false
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否是本地消息</p>
<ul>
<li><code>true</code>表示本地消息, 那么SDK并不会发送此条消息, 而是直接调用回调表示发送成功, 并更新对应的会话</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                         | 
                    
                        <a href="global.html#Message">Message</a>
                        
                    
            </td>
            <td class="description last"><ul>
<li>如果提供了参数fileInput, 那么先上传文件到服务器再发送, 不会返回<a href="IMMessage.html"><code>消息</code></a>, 会在beforesend里面返回<a href="IMMessage.html"><code>消息</code></a>.</li>
<li>如果提供了参数file, 那么直接发送文件消息, 返回<a href="IMMessage.html"><code>消息</code></a></li>
</ul></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.sendFile({<br>    scene: 'p2p',<br>    to: 'account',<br>    type: 'image',<br>    fileInput: fileInput,<br>    uploadprogress: function(obj) {<br>        console.log('文件总大小: ' + obj.total + 'bytes');<br>        console.log('已经上传的大小: ' + obj.loaded + 'bytes');<br>        console.log('上传进度: ' + obj.percentage);<br>        console.log('上传进度文本: ' + obj.percentageText);<br>    },<br>    uploaddone: function(error, file) {<br>        console.log('上传' + (!error?'成功':'失败'), error, file);<br>    },<br>    beforesend: function(msg) {<br>        console.log('正在发送p2p image消息, id=' + msg.idClient);<br>        pushMsg(msg);<br>    },<br>    done: sendMsgDone<br>});</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="sendGeo">
            
            sendGeo<span class="signature">(options, <span class="optional">apns</span>)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="global.html#Message">Message</a>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 311
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>发送地理位置消息</p>
<ul>
<li>地理位置消息是<a href="IMMessage.html#.type"><code>消息类型</code></a>的一种, <code>geo</code>参数请参考<a href="Geo.html"><code>地理位置对象</code></a></li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>scene</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>to</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>接收方, 对方帐号或者群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>geo</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>地理位置对象</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>lng</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>经度</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>lat</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>纬度</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>title</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>地址描述</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>resend</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否是重发</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>idClient</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>如果是重发, 那么需要带上之前生成的idClient来标记这条消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>custom</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>扩展字段</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>pushContent</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>自定义推送文案</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>pushPayload</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>自定义的推送属性</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>apns</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>特殊推送选项, 只在群会话中使用</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>accounts</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>需要特殊推送的账号列表, 不填表示推送给当前会话内的所有用户</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>content</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>需要特殊推送的文案, 不填的话默认为 pushContent</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>forcePush</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否强制推送, true 表示即使推送列表中的用户屏蔽了当前会话（如静音）, 仍能够推送当前这条内容给相应用户</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isHistoryable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否存储云端历史</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isRoamingable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否支持漫游</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isSyncable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否支持发送者多端同步</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.cc</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否支持抄送</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isPushable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否需要推送</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isOfflinable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否要存离线</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isUnreadable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否计入消息未读数</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.needPushNick</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否需要推送昵称</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isLocal</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    false
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否是本地消息</p>
<ul>
<li><code>true</code>表示本地消息, 那么SDK并不会发送此条消息, 而是直接调用回调表示发送成功, 并更新对应的会话</li>
</ul></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="global.html#Message">Message</a>
                        
                    
            </td>
            <td class="description last"><a href="IMMessage.html"><code>消息</code></a></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var msg = nim.sendGeo({<br>    scene: 'p2p',<br>    to: 'account',<br>    geo: {<br>        lng: '116.3833',<br>        lat: '39.9167',<br>        title: 'Beijing'<br>    },<br>    done: sendMsgDone<br>});<br>console.log('正在发送p2p geo消息, id=' + msg.idClient);<br>pushMsg(msg);</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="sendMsgReceipt">
            
            sendMsgReceipt<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 520
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>发送消息已读回执</p>
<ul>
<li>目前只支持<a href="IMMessage.html#.scene"><code>'p2p'</code></a>会话</li>
<li>如果没有传入消息, 则直接返回成功</li>
<li>如果已经发送过比传入的消息的时间戳大的已读回执, 那么直接返回成功</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>msg</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="IMMessage.html">IMMessage</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要发送已读回执的会话的最后一条消息, 可以直接通过<a href="Session.html"><code><code>session.lastMsg</code></code></a>来获取此消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.sendMsgReceipt({<br>    msg: session.lastMsg,<br>    done: sendMsgReceiptDone<br>});<br>function sendMsgReceiptDone(error, obj) {<br>    console.log('发送消息已读回执' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="sendText">
            
            sendText<span class="signature">(options, <span class="optional">apns</span>)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="global.html#Message">Message</a>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 18
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>发送文本消息</p>
<ul>
<li>文本消息是消息的一种, 请参考<a href="IMMessage.html"><code>消息</code></a></li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>scene</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>to</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>接收方, 对方帐号或者群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>text</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>文本消息内容</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>resend</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否是重发</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>idClient</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>如果是重发, 那么需要带上之前生成的idClient来标记这条消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>custom</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>扩展字段</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>pushContent</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>自定义推送文案</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>pushPayload</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>自定义的推送属性</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>needPushNick</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否需要推送昵称</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>apns</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>特殊推送选项, 只在群会话中使用</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>accounts</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>需要特殊推送的账号列表, 不填表示推送给当前会话内的所有用户</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>content</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>需要特殊推送的文案, 不填的话默认为 pushContent</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>forcePush</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否强制推送, true 表示即使推送列表中的胡勇屏蔽了当前会话（如静音）, 仍能够推送当前这条内容给相应用户</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isHistoryable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否存储云端历史</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isRoamingable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否支持漫游</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isSyncable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否支持发送者多端同步</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.cc</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否支持抄送</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isPushable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否需要推送</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isOfflinable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否要存离线</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isUnreadable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否计入消息未读数</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isLocal</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    false
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否是本地消息</p>
<ul>
<li><code>true</code>表示本地消息, 那么SDK并不会发送此条消息, 而是直接调用回调表示发送成功, 并更新对应的会话</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="global.html#Message">Message</a>
                        
                    
            </td>
            <td class="description last"><a href="IMMessage.html"><code>消息</code></a></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var msg = nim.sendText({<br>    scene: 'p2p',<br>    to: 'account',<br>    text: 'hello',<br>    done: sendMsgDone<br>});<br>console.log('正在发送p2p text消息, id=' + msg.idClient);<br>pushMsg(msg);<br>function sendMsgDone(error, msg) {<br>    console.log('发送' + msg.scene + ' ' + msg.type + '消息' + (!error?'成功':'失败') + ', id=' + msg.idClient, error, msg);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="sendTipMsg">
            
            sendTipMsg<span class="signature">(options, <span class="optional">apns</span>)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="global.html#Message">Message</a>}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 364
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>发送提醒消息</p>
<ul>
<li>提醒消息是<a href="IMMessage.html#.type"><code>消息类型</code></a>的一种</li>
<li>提醒消息用于会话内的状态提醒，如进入会话时出现的欢迎消息，或者会话命中敏感词后的提示消息等等.</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>scene</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>to</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Number</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>接收方, 对方帐号或者群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>tip</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>提醒内容</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>resend</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否是重发</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>idClient</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>如果是重发, 那么需要带上之前生成的idClient来标记这条消息</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>custom</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>扩展字段</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>pushContent</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>自定义推送文案</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>pushPayload</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>自定义的推送属性</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>apns</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>特殊推送选项, 只在群会话中使用</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>accounts</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>需要特殊推送的账号列表, 不填表示推送给当前会话内的所有用户</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>content</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>需要特殊推送的文案, 不填的话默认为 pushContent</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>forcePush</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否强制推送, true 表示即使推送列表中的胡勇屏蔽了当前会话（如静音）, 仍能够推送当前这条内容给相应用户</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isHistoryable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否存储云端历史</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isRoamingable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否支持漫游</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isSyncable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否支持发送者多端同步</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.cc</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否支持抄送</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isPushable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否需要推送</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isOfflinable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否要存离线</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isUnreadable</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否计入消息未读数</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.needPushNick</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    true
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否需要推送昵称</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>options.isLocal</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    false
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否是本地消息</p>
<ul>
<li><code>true</code>表示本地消息, 那么SDK并不会发送此条消息, 而是直接调用回调表示发送成功, 并更新对应的会话</li>
</ul></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        <a href="global.html#Message">Message</a>
                        
                    
            </td>
            <td class="description last"><a href="IMMessage.html"><code>消息</code></a></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var msg = nim.sendTipMsg({<br>    scene: 'p2p',<br>    to: 'account',<br>    tip: 'tip content',<br>    done: sendMsgDone<br>});<br>console.log('正在发送p2p提醒消息, id=' + msg.idClient);<br>pushMsg(msg);</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="setCurrSession">
            
            setCurrSession<span class="signature">(sessionId)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/session.js, line 14
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>设置当前会话</p>
<ul>
<li>设置后, 当前会话未读数会被置为 <code>0</code>, 同时开发者会收到 <code>onupdatesession</code> 回调</li>
<li>之后此会话在收到消息之后不会更新未读数</li>
<li>传空字符串的话, 重置当前会话为空</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>sessionId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>会话ID</p></td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.setCurrSession('sessionId');</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="setOptions">
            
            setOptions<span class="signature">(options)</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/index.js, line 537
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>更新配置, 参数格式跟 <a href="NIM.html#.getInstance"><code>NIM.getInstance</code></a> 保持一致</p>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>token</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>帐号的 token, 用于建立连接</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>// 更新 token 的例子<br>nim.setOptions({<br>    token: 'newToken'<br>});</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="stripImageMeta">
            
            stripImageMeta<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/nos.js, line 47
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>去除图片元信息</p>
<ul>
<li>只支持通过<a href="NIM.html#previewFile"><code>预览文件</code></a>或<a href="NIM.html#sendFile"><code>发送文件消息</code></a>拿到的图片 url, 或者经过其他图片操作后拿到的图片 url</li>
<li>去除元信息后的图片将不包含 <a target="_blank" href="https://en.wikipedia.org/wiki/Exchangeable_image_file_format">EXIF</a> 信息</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>url</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原图 url</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时附上 interlace 后的图片 url</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var url = 'http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=';<br>var interlaceUrl = nim.stripImageMeta({<br>    url: url,<br>    strip: true,<br>    done: stripImageMetaDone<br>});<br>function stripImageMetaDone(error, obj) {<br>    console.log('去除图片元信息' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="thumbnailImage">
            
            thumbnailImage<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/nos.js, line 213
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>生成缩略图</p>
<ul>
<li>只支持通过<a href="NIM.html#previewFile"><code>预览文件</code></a>或<a href="NIM.html#sendFile"><code>发送文件消息</code></a>拿到的图片 url, 或者经过其他图片操作后拿到的图片 url</li>
<li>width/height 限制了缩略图的尺寸<ul>
<li>width/height 必须大于等于 0, 不能同时为 0, 必须小于 4096</li>
</ul>
</li>
<li>不同模式下生成的缩略图是不一样的, 目前支持以下三种模式<ul>
<li><code>'cover'</code>: 原图片等比缩略, 缩略图一边等于请求的尺寸, 另一边大于请求的尺寸, 即缩略图刚好能覆盖住尺寸为 width*height 的矩形</li>
<li><code>'contain'</code>: 原图片等比缩略, 缩略图一边等于请求的尺寸, 另一边小于请求的尺寸, 即尺寸为 width*height 的矩形刚好能覆盖住缩略图</li>
<li><code>'crop'</code>: 先等比缩略原图片, 使得一边等于请求的尺寸, 另一边大于请求的尺寸, 然后对大于请求尺寸的那条边进行裁剪, 使得最终的图片大小刚好等于请求的尺寸</li>
</ul>
</li>
<li>如果缩略图尺寸大于图片尺寸, 默认情况下图片不会被放大, 可以传入参数<code>enlarge=true</code>来放大图片</li>
<li><code>'crop'</code> 模式下可以传入参数 axis.x 或 axis.y 来控制最后一步裁剪的位置<ul>
<li>x/y 必须为整数, 取值范围为 0-10, 此方法内部使用 Math.round 来格式化 x/y</li>
<li>x 为 0 时表示裁取最左端, x 为 10 时表示裁取最右端</li>
<li>y 为 0 时表示裁取最上端, y 为 10 时表示裁取最下端</li>
<li>x/y 默认值均为 5, 即裁取正中间</li>
</ul>
</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		<th>Default</th>
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>url</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>原图 url</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>width</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Int</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>缩略图的最大宽度, 必须为整数, 此方法内部使用 Math.round 来格式化 width/height</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>height</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Int</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>缩略图的最大高度, 必须为整数, 此方法内部使用 Math.round 来格式化 width/height</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>mode</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>缩略模式, 目前支持以下三种模式, 请参考上面的描述</p>
<ul>
<li><code>'cover'</code></li>
<li><code>'contain'</code></li>
<li><code>'crop'</code></li>
</ul></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>axis.x</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Int</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p><code>'crop'</code> 模式下控制最后一步裁剪的位置, 请参考上面的描述</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>axis.y</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Int</span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p><code>'crop'</code> 模式下控制最后一步裁剪的位置, 请参考上面的描述</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>enlarge</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
                <td class="default">
                
                    false
                
                </td>
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>当图片尺寸小于要缩略的尺寸时, 是否放大图片, 默认<code>false</code>不放大</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
                <td class="default">
                
                </td>
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数, 成功时附上缩略后的图片 url</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var url = 'http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=';<br>var thumbnailUrl = nim.thumbnailImage({<br>    url: url,<br>    mode: 'cover',<br>    width: 80,<br>    height: 100,<br>    done: thumbnailImageDone<br>});<br>function thumbnailImageDone(error, obj) {<br>    console.log('生成缩略图' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="transferTeam">
            
            transferTeam<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 704
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>转让群</p>
<ul>
<li><a href="NIM.html#transferTeam"><code>转让群</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach.type"><code><code>'transferTeam'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为转让群的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>account</code>的值为为新群主的帐号, <code>attach</code>有一个字段<code>members</code>的值为包含新旧群主的群成员列表。</li>
<li>如果转让群的同时离开群, 那么相当于调用<a href="NIM.html#leaveTeam"><code>主动退群</code></a>来离开群, 所有<a href="TeamMember.html"><code>群成员</code></a>会再收到一条类型为<a href="IMMessage.html#.attach.type"><code><code>'leaveTeam'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>新群主的帐号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>leave</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>转让群的同时是否离开群</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.transferTeam({<br>    teamId: '123',<br>    account: 'zyy2',<br>    leave: false,<br>    done: transferOwnerDone<br>});<br>function transferOwnerDone(error, obj) {<br>    console.log('转让群' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#leaveTeam"><code>离开群</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="updateFriend">
            
            updateFriend<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/friend.js, line 263
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>更新好友</p>
<ul>
<li>开发者可以用此接口来更新好友的备注</li>
<li>开发者也可以使用JSON格式的扩展字段来进行扩展</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>要更新的好友的account</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>alias</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>备注</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>custom</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>扩展字段, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.updateFriend({<br>    account: 'account',<br>    alias: 'alias',<br>    custom: 'custom',<br>    done: updateFriendDone<br>});<br>function updateFriendDone(error, obj) {<br>    console.log('更新好友' + (!error?'成功':'失败'), error, obj);<br>    if (!error) {<br>        onUpdateFriend(obj);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#updateFriend"><code>直接加为好友</code></a></li>
        
            <li><a href="NIM.html#applyFriend"><code>申请加为好友</code></a></li>
        
            <li><a href="NIM.html#passFriendApply"><code>通过好友申请</code></a></li>
        
            <li><a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a></li>
        
            <li><a href="NIM.html#deleteFriend"><code>删除好友</code></a></li>
        
            <li><a href="NIM.html#getFriends"><code>获取好友列表</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="updateInfoInTeam">
            
            updateInfoInTeam<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 534
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>修改自己的群属性</p>
<p>目前支持修改的属性有这些</p>
<ul>
<li><code>nickInTeam</code>: 自己在群里面的群昵称<ul>
<li>更新昵称后, 所有其它在线的<a href="TeamMember.html"><code>群成员</code></a>会收到<a href="NIM.html"><code>初始化SDK</code></a>时传入的<code>onupdateteammember</code>回调。</li>
</ul>
</li>
<li><code>muteTeam</code>: 是否关闭此群的消息提醒, <code>true</code>表示关闭提醒, 但是SDK仍然会收到这个群的消息, SDK只是记录这个设置, 具体根据这个设置要执行的操作由第三方APP决定, 设置之后可以调用接口<a href="NIM.html#notifyForNewTeamMsg"><code>NIM#notifyForNewTeamMsg</code></a>来查询是否需要群消息通知</li>
<li><code>custom</code>: 第三方扩展字段, 开发者可以自行扩展, 建议封装成JSON格式字符串</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>nickInTeam</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>在群里面的昵称</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>muteTeam</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>是否关闭此群的消息提醒, <code>true</code>表示关闭提醒, 但是SDK仍然会收到这个群的消息, SDK只是记录这个设置, 具体根据这个设置要执行的操作由第三方APP决定</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>custom</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>第三方扩展字段, 开发者可以自行扩展, 建议封装成JSON格式字符串</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.updateInfoInTeam({<br>    teamId: '123',<br>    // 此参数为可选参数<br>    // nickInTeam: '群昵称',<br>    // 静音群, 此参数为可选参数<br>    // muteTeam: true,<br>    // 第三方扩展字段<br>    // custom: '{}'<br>    done: updateInfoInTeamDone<br>});<br>function updateInfoInTeamDone(error, obj) {<br>    console.log('修改自己的群属性' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#updateNickInTeam"><code>修改别人的群昵称</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="updateLocalMsg">
            
            updateLocalMsg<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/msg.js, line 1033
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>更新本地消息</p>
<ul>
<li>更新 <code>idClient</code> 对应的本地消息</li>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
<li>如果对应的消息不存在, 算成功, 返回 null</li>
<li>这些字段只会被更新到本地数据库, 不会被更新到服务器上</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>idClient</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>idClient</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>localCustom</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>自定义字段</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数, 成功时会额外附上<a href="IMMessage.html"><code>消息</code></a></p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.updateLocalMsg({<br>    id: 'p2p-account',<br>    localCustom: '{&quot;key&quot;,&quot;value&quot;}',<br>    done: updateLocalMsgDone<br>});<br>function updateLocalMsgDone(error, obj) {<br>    console.log('更新本地消息' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="updateLocalSession">
            
            updateLocalSession<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/session.js, line 215
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>更新本地会话</p>
<ul>
<li>更新 <code>id</code> 对应的本地会话</li>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
<li>如果对应的会话不存在, 算成功, 返回 null</li>
<li>这些字段只会被更新到本地数据库, 不会被更新到服务器上</li>
<li>目前只允许更新 <code>localCustom</code></li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>id</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>localCustom</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>自定义字段</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数, 成功时会额外附上<a href="Session.html"><code>会话</code></a></p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.updateLocalSession({<br>    id: 'p2p-account',<br>    localCustom: '{&quot;key&quot;,&quot;value&quot;}',<br>    done: updateLocalSessionDone<br>});<br>function updateLocalSessionDone(error, obj) {<br>    console.log('更新本地会话' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="updateLocalSysMsg">
            
            updateLocalSysMsg<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/sysMsg.js, line 236
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>更新本地系统通知</p>
<ul>
<li>更新 <code>idServer</code> 对应的本地系统通知</li>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
<li>如果对应的系统通知不存在, 算成功, 返回 null</li>
<li>这些字段只会被更新到本地数据库, 不会被更新到服务器上</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>idServer</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>idServer</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>status</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>状态</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>localCustom</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>自定义字段</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数, 成功时会额外附上<a href="SystemMessage.html"><code>系统通知</code></a></p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.updateLocalSysMsg({<br>    idServer: '1234',<br>    status: 'bingo',<br>    localCustom: '{&quot;key&quot;,&quot;value&quot;}',<br>    done: updateLocalSysMsgDone<br>});<br>function updateLocalSysMsgDone(error, obj) {<br>    console.log(error);<br>    console.log(obj);<br>    console.log('更新本地系统通知' + (!error?'成功':'失败'));<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="updateMuteStateInTeam">
            
            updateMuteStateInTeam<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 612
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>更新群成员禁言状态</p>
<ul>
<li><a href="NIM.html#updateMuteStateInTeam"><code>更新群成员禁言状态</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach.type"><code><code>'updateTeamMute'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为操作方, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>account</code>的值为被禁言的帐号, <code>attach</code>有一个字段<code>members</code>的值为被禁言的群成员列表。</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要修改昵称的<a href="TeamMember.html"><code>群成员</code></a>的帐号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>mute</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>是否要禁言</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.updateMuteStateInTeam({<br>    teamId: '123',<br>    account: 'a',<br>    mute: true,<br>    done: updateMuteStateInTeamDone<br>})<br>function updateMuteStateInTeamDone(error, obj) {<br>    console.log('更新群成员禁言状态' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="updateMyInfo">
            
            updateMyInfo<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/user.js, line 14
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>更新我的名片</p>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>nick</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>昵称</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>avatar</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>头像</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>sign</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>签名</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>gender</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p><a href="User.html#.gender"><code>性别</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>email</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>邮箱</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>birth</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>生日</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>tel</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>手机号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>custom</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>扩展字段</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.updateMyInfo({<br>    nick: 'newNick',<br>    avatar: 'http://newAvatar',<br>    sign: 'newSign',<br>    gender: 'male',<br>    email: 'new@email.com',<br>    birth: '1900-01-01',<br>    tel: '13523578129',<br>    custom: '{type: &quot;newCustom&quot;, value: &quot;new&quot;}',<br>    done: updateMyInfoDone<br>});<br>function updateMyInfoDone(error, user) {<br>    console.log('更新登录用户的名片' + (!error?'成功':'失败'), error, user);<br>    if (!error) {<br>        onUpdateMyInfo(user);<br>    }<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#getUser"><code>获取用户名片</code></a></li>
        
            <li><a href="NIM.html#getUsers"><code>获取用户名片数组</code></a></li>
        
            <li><a href="NIM.html#updateMyInfo"><code>更新登录用户的名片</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="updateNickInTeam">
            
            updateNickInTeam<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 578
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>修改别人的群昵称</p>
<ul>
<li>所有其它在线的<a href="TeamMember.html"><code>群成员</code></a>会收到<a href="NIM.html"><code>初始化SDK</code></a>时传入的<code>onupdateteammember</code>回调</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>account</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>要修改昵称的<a href="TeamMember.html"><code>群成员</code></a>的帐号</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>nickInTeam</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>群昵称</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.updateNickInTeam({<br>    teamId: '123',<br>    account: 'a2',<br>    nickInTeam: '群昵称',<br>    done: updateNickInTeamDone<br>});<br>function updateNickInTeamDone(error, obj) {<br>    console.log('修改自己的群属性' + (!error?'成功':'失败'), error, obj);<br>}</p></code></pre>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="NIM.html#updateInfoInTeam"><code>修改自己的群属性</code></a></li>
        </ul>
    </dd>
    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="updateTeam">
            
            updateTeam<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/team.js, line 104
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>更新群</p>
<ul>
<li><a href="Team.html#.type"><code>普通群</code></a>不可以更新<ul>
<li><a href="Team.html#.joinMode"><code>群加入方式</code></a></li>
<li><a href="Team.html#.beInviteMode"><code>群被邀请模式</code></a></li>
<li><a href="Team.html#.inviteMode"><code>群邀请模式</code></a></li>
<li><a href="Team.html#.updateTeamMode"><code>群信息修改权限</code></a></li>
<li><a href="Team.html#.updateCustomMode"><code>群信息自定义字段修改权限</code></a></li>
</ul>
</li>
<li><a href="NIM.html#updateTeam"><code>更新群</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach.type"><code><code>'updateTeam'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为更新群的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为被更新的<a href="Team.html"><code>群信息</code></a>。</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>teamId</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>群id</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>name</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>群名字</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>avatar</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>群头像</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>intro</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>群简介</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>announcement</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>群公告</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>joinMode</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p><a href="Team.html#.joinMode"><code>群加入方式</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>beInviteMode</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p><a href="Team.html#.beInviteMode"><code>群被邀请模式</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>inviteMode</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p><a href="Team.html#.inviteMode"><code>群邀请模式</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>updateTeamMode</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p><a href="Team.html#.updateTeamMode"><code>群信息修改权限</code></a></p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>updateCustomMode</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>Team.updateCustomMode|群信息自定义字段修改权限}</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>custom</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                        <span class="optional">optional</span>
                    
                    
                        
                    
                
                <p>扩展字段</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                    
                    
                        
                    
                
                <p>结果回调函数</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>nim.updateTeam({<br>    teamId: '123',<br>    name: '群名字',<br>    avatar: 'avatar',<br>    intro: '群简介',<br>    announcement: '群公告',<br>    custom: '自定义字段',<br>    done: updateTeamDone<br>});<br>function updateTeamDone(error, team) {<br>    console.log('更新群' + (!error?'成功':'失败'), error, team);<br>}</p></code></pre>
    

    

    
</dd>

        
            
<dt>
    <div class="nameContainer">
        <h4 class="name" id="viewImageStripMeta">
            
            viewImageStripMeta<span class="signature">(options)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Void}</span>
        </h4>
    
        
        <!-- <div class="tag-source">
            api/nim/nosViewImage.js, line 9
        </div> -->
        
    </div>

    
</dt>
<dd>
    
    
    <div class="description">
        <p>预览去除图片元信息</p>
<ul>
<li>只支持通过<a href="NIM.html#previewFile"><code>预览文件</code></a>或<a href="NIM.html#sendFile"><code>发送文件消息</code></a>拿到的图片 url, 或者经过其他图片操作后拿到的图片 url</li>
<li>去除元信息后的图片将不包含 <a target="_blank" href="https://en.wikipedia.org/wiki/Exchangeable_image_file_format">EXIF</a> 信息</li>
</ul>
    </div>
    

    
    
    
    
    
        <h5>Params:</h5>
        

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>options</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>配置参数</p>
                

<table class="params">
    <thead>
	<tr>
		
		<th>Name</th>
		
		
		<th>Type</th>
		
		
		
		<th class="last">Description</th>
	</tr>
	</thead>
	
	<tbody>
	
	
        <tr>
            
                <td class="name"><code>url</code></td>
            
            
            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>原图 url</p></td>
        </tr>
	
	
	
        <tr>
            
                <td class="name"><code>done</code></td>
            
            
            <td class="type">
            
                
<span class="param-type"><a href="global.html#done">done</a></span>


            
            </td>
            
            
            
            <td class="description last">
                
                <p>结果回调函数, 成功时附上 interlace 后的图片 url</p></td>
        </tr>
	
	
	</tbody>
</table>
            </td>
        </tr>
	
	
	</tbody>
</table>
    
    
    
<dl class="details">
    
        
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
</dl>

    
    

    

    
    
    
    
    
    <h5>Returns:</h5>
    


<table class="params">
    <thead>
    <tr>
        
        <th>Type</th>
        <th class="last">Description</th>
    </tr>
    </thead>
    <tbody>
    
        <tr>
            
            <td class="type">
            
                        Void
                        
                    
            </td>
            <td class="description last"></td>
        </tr>
    
    </tbody>
</table>

    
    
    
        <h5>Example:</h5>
        

    
    <pre class="prettyprint"><code><p>var url = 'http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=';<br>var stripMetaUrl = nim.viewImageStripMeta({<br>    url: url,<br>    strip: true<br>});</p></code></pre>
    

    

    
</dd>

        </dl>
    
    
    
    
    
</article>

</section>  





        

        <!-- <footer>
            Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Fri Jan 20 2017 15:36:55 GMT+0800 (CST)
        </footer> -->
    </div>
</div>
<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/main.js"></script>
</body>
</html>